Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class TextToSpeechSettings.
Instructs the speech synthesizer on how to generate the output audio content.
Generated from protobuf message google.cloud.dialogflow.v2.TextToSpeechSettings
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ enable_text_to_speech |
bool
Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained. |
↳ output_audio_encoding |
int
Required. Audio encoding of the synthesized audio content. |
↳ sample_rate_hertz |
int
Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality). |
↳ synthesize_speech_configs |
array|Google\Protobuf\Internal\MapField
Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig. |
getEnableTextToSpeech
Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
bool |
setEnableTextToSpeech
Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
Generated from protobuf field bool enable_text_to_speech = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getOutputAudioEncoding
Required. Audio encoding of the synthesized audio content.
Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
int |
setOutputAudioEncoding
Required. Audio encoding of the synthesized audio content.
Generated from protobuf field .google.cloud.dialogflow.v2.OutputAudioEncoding output_audio_encoding = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getSampleRateHertz
Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
setSampleRateHertz
Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
Generated from protobuf field int32 sample_rate_hertz = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getSynthesizeSpeechConfigs
Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
Generated from protobuf field map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setSynthesizeSpeechConfigs
Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
Generated from protobuf field map<string, .google.cloud.dialogflow.v2.SynthesizeSpeechConfig> synthesize_speech_configs = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |