Reference documentation and code samples for the Cloud Text-to-Speech V1 Client class SafetySetting.
Safety setting for a single harm category.
Generated from protobuf message google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting
Namespace
Google \ Cloud \ TextToSpeech \ V1 \ AdvancedVoiceOptionsMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
The harm category to apply the safety setting to. |
↳ threshold |
int
The harm block threshold for the safety setting. |
getCategory
The harm category to apply the safety setting to.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmCategory. |
setCategory
The harm category to apply the safety setting to.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getThreshold
The harm block threshold for the safety setting.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmBlockThreshold. |
setThreshold
The harm block threshold for the safety setting.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmBlockThreshold. |
| Returns | |
|---|---|
| Type | Description |
$this |
|