|
34 | 34 | * <pre>
|
35 | 35 | * <code>
|
36 | 36 | * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) {
|
37 |
| - * String languageCode = ""; |
38 |
| - * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); |
| 37 | + * SynthesisInput input = SynthesisInput.newBuilder().build(); |
| 38 | + * VoiceSelectionParams voice = VoiceSelectionParams.newBuilder().build(); |
| 39 | + * AudioConfig audioConfig = AudioConfig.newBuilder().build(); |
| 40 | + * SynthesizeSpeechResponse response = textToSpeechClient.synthesizeSpeech(input, voice, audioConfig); |
39 | 41 | * }
|
40 | 42 | * </code>
|
41 | 43 | * </pre>
|
@@ -143,73 +145,6 @@ public TextToSpeechStub getStub() {
|
143 | 145 | return stub;
|
144 | 146 | }
|
145 | 147 |
|
146 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
147 |
| - /** |
148 |
| - * Returns a list of Voice supported for synthesis. |
149 |
| - * |
150 |
| - * <p>Sample code: |
151 |
| - * |
152 |
| - * <pre><code> |
153 |
| - * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
154 |
| - * String languageCode = ""; |
155 |
| - * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); |
156 |
| - * } |
157 |
| - * </code></pre> |
158 |
| - * |
159 |
| - * @param languageCode Optional. Recommended. |
160 |
| - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If specified, the |
161 |
| - * ListVoices call will only return voices that can be used to synthesize this language_code. |
162 |
| - * E.g. when specifying "en-NZ", you will get supported "en-*" voices; when specifying |
163 |
| - * "no", you will get supported "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) |
164 |
| - * voices; specifying "zh" will also get supported "cmn-*" voices; specifying "zh-hk" will |
165 |
| - * also get supported "yue-*" voices. |
166 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
167 |
| - */ |
168 |
| - public final ListVoicesResponse listVoices(String languageCode) { |
169 |
| - ListVoicesRequest request = |
170 |
| - ListVoicesRequest.newBuilder().setLanguageCode(languageCode).build(); |
171 |
| - return listVoices(request); |
172 |
| - } |
173 |
| - |
174 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
175 |
| - /** |
176 |
| - * Returns a list of Voice supported for synthesis. |
177 |
| - * |
178 |
| - * <p>Sample code: |
179 |
| - * |
180 |
| - * <pre><code> |
181 |
| - * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
182 |
| - * ListVoicesRequest request = ListVoicesRequest.newBuilder().build(); |
183 |
| - * ListVoicesResponse response = textToSpeechClient.listVoices(request); |
184 |
| - * } |
185 |
| - * </code></pre> |
186 |
| - * |
187 |
| - * @param request The request object containing all of the parameters for the API call. |
188 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
189 |
| - */ |
190 |
| - public final ListVoicesResponse listVoices(ListVoicesRequest request) { |
191 |
| - return listVoicesCallable().call(request); |
192 |
| - } |
193 |
| - |
194 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
195 |
| - /** |
196 |
| - * Returns a list of Voice supported for synthesis. |
197 |
| - * |
198 |
| - * <p>Sample code: |
199 |
| - * |
200 |
| - * <pre><code> |
201 |
| - * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
202 |
| - * ListVoicesRequest request = ListVoicesRequest.newBuilder().build(); |
203 |
| - * ApiFuture<ListVoicesResponse> future = textToSpeechClient.listVoicesCallable().futureCall(request); |
204 |
| - * // Do something |
205 |
| - * ListVoicesResponse response = future.get(); |
206 |
| - * } |
207 |
| - * </code></pre> |
208 |
| - */ |
209 |
| - public final UnaryCallable<ListVoicesRequest, ListVoicesResponse> listVoicesCallable() { |
210 |
| - return stub.listVoicesCallable(); |
211 |
| - } |
212 |
| - |
213 | 148 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
214 | 149 | /**
|
215 | 150 | * Synthesizes speech synchronously: receive results after all text input has been processed.
|
@@ -295,6 +230,73 @@ public final SynthesizeSpeechResponse synthesizeSpeech(SynthesizeSpeechRequest r
|
295 | 230 | return stub.synthesizeSpeechCallable();
|
296 | 231 | }
|
297 | 232 |
|
| 233 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 234 | + /** |
| 235 | + * Returns a list of Voice supported for synthesis. |
| 236 | + * |
| 237 | + * <p>Sample code: |
| 238 | + * |
| 239 | + * <pre><code> |
| 240 | + * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
| 241 | + * String languageCode = ""; |
| 242 | + * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); |
| 243 | + * } |
| 244 | + * </code></pre> |
| 245 | + * |
| 246 | + * @param languageCode Optional. Recommended. |
| 247 | + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If specified, the |
| 248 | + * ListVoices call will only return voices that can be used to synthesize this language_code. |
| 249 | + * E.g. when specifying "en-NZ", you will get supported "en-*" voices; when specifying |
| 250 | + * "no", you will get supported "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) |
| 251 | + * voices; specifying "zh" will also get supported "cmn-*" voices; specifying "zh-hk" will |
| 252 | + * also get supported "yue-*" voices. |
| 253 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 254 | + */ |
| 255 | + public final ListVoicesResponse listVoices(String languageCode) { |
| 256 | + ListVoicesRequest request = |
| 257 | + ListVoicesRequest.newBuilder().setLanguageCode(languageCode).build(); |
| 258 | + return listVoices(request); |
| 259 | + } |
| 260 | + |
| 261 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 262 | + /** |
| 263 | + * Returns a list of Voice supported for synthesis. |
| 264 | + * |
| 265 | + * <p>Sample code: |
| 266 | + * |
| 267 | + * <pre><code> |
| 268 | + * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
| 269 | + * ListVoicesRequest request = ListVoicesRequest.newBuilder().build(); |
| 270 | + * ListVoicesResponse response = textToSpeechClient.listVoices(request); |
| 271 | + * } |
| 272 | + * </code></pre> |
| 273 | + * |
| 274 | + * @param request The request object containing all of the parameters for the API call. |
| 275 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 276 | + */ |
| 277 | + public final ListVoicesResponse listVoices(ListVoicesRequest request) { |
| 278 | + return listVoicesCallable().call(request); |
| 279 | + } |
| 280 | + |
| 281 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 282 | + /** |
| 283 | + * Returns a list of Voice supported for synthesis. |
| 284 | + * |
| 285 | + * <p>Sample code: |
| 286 | + * |
| 287 | + * <pre><code> |
| 288 | + * try (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { |
| 289 | + * ListVoicesRequest request = ListVoicesRequest.newBuilder().build(); |
| 290 | + * ApiFuture<ListVoicesResponse> future = textToSpeechClient.listVoicesCallable().futureCall(request); |
| 291 | + * // Do something |
| 292 | + * ListVoicesResponse response = future.get(); |
| 293 | + * } |
| 294 | + * </code></pre> |
| 295 | + */ |
| 296 | + public final UnaryCallable<ListVoicesRequest, ListVoicesResponse> listVoicesCallable() { |
| 297 | + return stub.listVoicesCallable(); |
| 298 | + } |
| 299 | + |
298 | 300 | @Override
|
299 | 301 | public final void close() {
|
300 | 302 | stub.close();
|
|
0 commit comments