Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / dialogflow / v2beta1 / audio_config.proto
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.cloud.dialogflow.v2beta1;
18
19 import "google/api/annotations.proto";
20
21 option cc_enable_arenas = true;
22 option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
23 option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
24 option java_multiple_files = true;
25 option java_outer_classname = "AudioConfigProto";
26 option java_package = "com.google.cloud.dialogflow.v2beta1";
27 option objc_class_prefix = "DF";
28
29 // Description of which voice to use for speech synthesis.
30 message VoiceSelectionParams {
31   // Optional. The name of the voice. If not set, the service will choose a
32   // voice based on the other parameters such as language_code and gender.
33   string name = 1;
34
35   // Optional. The preferred gender of the voice. If not set, the service will
36   // choose a voice based on the other parameters such as language_code and
37   // name. Note that this is only a preference, not requirement. If a
38   // voice of the appropriate gender is not available, the synthesizer should
39   // substitute a voice with a different gender rather than failing the request.
40   SsmlVoiceGender ssml_gender = 2;
41 }
42
43 // Configuration of how speech should be synthesized.
44 message SynthesizeSpeechConfig {
45   // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
46   // native speed supported by the specific voice. 2.0 is twice as fast, and
47   // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
48   // other values < 0.25 or > 4.0 will return an error.
49   double speaking_rate = 1;
50
51   // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
52   // semitones from the original pitch. -20 means decrease 20 semitones from the
53   // original pitch.
54   double pitch = 2;
55
56   // Optional. Volume gain (in dB) of the normal native volume supported by the
57   // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
58   // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
59   // will play at approximately half the amplitude of the normal native signal
60   // amplitude. A value of +6.0 (dB) will play at approximately twice the
61   // amplitude of the normal native signal amplitude. We strongly recommend not
62   // to exceed +10 (dB) as there's usually no effective increase in loudness for
63   // any value greater than that.
64   double volume_gain_db = 3;
65
66   // Optional. An identifier which selects 'audio effects' profiles that are
67   // applied on (post synthesized) text to speech. Effects are applied on top of
68   // each other in the order they are given.
69   repeated string effects_profile_id = 5;
70
71   // Optional. The desired voice of the synthesized audio.
72   VoiceSelectionParams voice = 4;
73 }
74
75 // Instructs the speech synthesizer how to generate the output audio content.
76 message OutputAudioConfig {
77   // Required. Audio encoding of the synthesized audio content.
78   OutputAudioEncoding audio_encoding = 1;
79
80   // Optional. The synthesis sample rate (in hertz) for this audio. If not
81   // provided, then the synthesizer will use the default sample rate based on
82   // the audio encoding. If this is different from the voice's natural sample
83   // rate, then the synthesizer will honor this request by converting to the
84   // desired sample rate (which might result in worse audio quality).
85   int32 sample_rate_hertz = 2;
86
87   // Optional. Configuration of how speech should be synthesized.
88   SynthesizeSpeechConfig synthesize_speech_config = 3;
89 }
90
91 // Gender of the voice as described in
92 // [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
93 enum SsmlVoiceGender {
94   // An unspecified gender, which means that the client doesn't care which
95   // gender the selected voice will have.
96   SSML_VOICE_GENDER_UNSPECIFIED = 0;
97
98   // A male voice.
99   SSML_VOICE_GENDER_MALE = 1;
100
101   // A female voice.
102   SSML_VOICE_GENDER_FEMALE = 2;
103
104   // A gender-neutral voice.
105   SSML_VOICE_GENDER_NEUTRAL = 3;
106 }
107
108 // Audio encoding of the output audio format in Text-To-Speech.
109 enum OutputAudioEncoding {
110   // Not specified.
111   OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0;
112
113   // Uncompressed 16-bit signed little-endian samples (Linear PCM).
114   // Audio content returned as LINEAR16 also contains a WAV header.
115   OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
116
117   // MP3 audio.
118   OUTPUT_AUDIO_ENCODING_MP3 = 2;
119
120   // Opus encoded audio wrapped in an ogg container. The result will be a
121   // file which can be played natively on Android, and in browsers (at least
122   // Chrome and Firefox). The quality of the encoding is considerably higher
123   // than MP3 while using approximately the same bitrate.
124   OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
125 }