Skip to content

Commit

Permalink
feat(text-to-speech-v1): add voices and update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkowa committed Mar 15, 2022
1 parent 4211f51 commit 40cd035
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 143 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428
*/

package com.ibm.watson.text_to_speech.v1;
Expand Down Expand Up @@ -91,16 +91,13 @@
* when combined, sound like the word. A phonetic translation is based on the SSML phoneme format
* for representing a word. You can specify a phonetic translation in standard International
* Phonetic Alphabet (IPA) representation or in the proprietary IBM Symbolic Phonetic Representation
* (SPR).
* (SPR). For phonetic translation, the Arabic, Chinese, Dutch, Australian English, Korean, and
* Swedish voices support only IPA, not SPR.
*
* <p>The service also offers a Tune by Example feature that lets you define custom prompts. You can
* also define speaker models to improve the quality of your custom prompts. The service support
* custom prompts only for US English custom models and voices.
*
* <p>**IBM Cloud&amp;reg;.** The Arabic, Chinese, Dutch, Australian English, and Korean languages
* and voices are supported only for IBM Cloud. For phonetic translation, they support only IPA, not
* SPR.
*
* <p>API Version: 1.0.0 See: https://cloud.ibm.com/docs/text-to-speech
*/
public class TextToSpeech extends BaseService {
Expand Down Expand Up @@ -209,25 +206,10 @@ public ServiceCall<Voices> listVoices() {
* <p>**See also:** [Listing a specific
* voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoice).
*
* <p>### Important voice updates for IBM Cloud
*
* <p>The service's voices underwent significant change on 2 December 2020. * The Arabic, Chinese,
* Dutch, Australian English, and Korean voices are now neural instead of concatenative. * The
* `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. * The `ar-AR`
* language identifier cannot be used to create a custom model. Use the `ar-MS` identifier
* instead. * The standard concatenative voices for the following languages are now deprecated:
* Brazilian Portuguese, United Kingdom and United States English, French, German, Italian,
* Japanese, and Spanish (all dialects). * The features expressive SSML, voice transformation
* SSML, and use of the `volume` attribute of the `&lt;prosody&gt;` element are deprecated and are
* not supported with any of the service's neural voices. * All of the service's voices are now
* customizable and generally available (GA) for production use.
*
* <p>The deprecated voices and features will continue to function for at least one year but might
* be removed at a future date. You are encouraged to migrate to the equivalent neural voices at
* your earliest convenience. For more information about all voice updates, see the [2 December
* 2020 service
* update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020)
* in the release notes for IBM Cloud.
* <p>**Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English,
* Korean, and Swedish languages and voices are supported only for IBM Cloud; they are deprecated
* for IBM Cloud Pak for Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the
* `ar-MS_OmarVoice` voice instead.
*
* @param getVoiceOptions the {@link GetVoiceOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link Voice}
Expand Down Expand Up @@ -268,6 +250,11 @@ public ServiceCall<Voice> getVoice(GetVoiceOptions getVoiceOptions) {
* <p>**See also:** [The HTTP
* interface](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-usingHTTP#usingHTTP).
*
* <p>**Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English,
* Korean, and Swedish languages and voices are supported only for IBM Cloud; they are deprecated
* for IBM Cloud Pak for Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the
* `ar-MS_OmarVoice` voice instead.
*
* <p>### Audio formats (accept types)
*
* <p>The service can return audio in the following formats (MIME types). * Where indicated, you
Expand Down Expand Up @@ -303,26 +290,6 @@ public ServiceCall<Voice> getVoice(GetVoiceOptions getVoiceOptions) {
* some of the formats, see [Using audio
* formats](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-audio-formats).
*
* <p>### Important voice updates for IBM Cloud
*
* <p>The service's voices underwent significant change on 2 December 2020. * The Arabic, Chinese,
* Dutch, Australian English, and Korean voices are now neural instead of concatenative. * The
* `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. * The `ar-AR`
* language identifier cannot be used to create a custom model. Use the `ar-MS` identifier
* instead. * The standard concatenative voices for the following languages are now deprecated:
* Brazilian Portuguese, United Kingdom and United States English, French, German, Italian,
* Japanese, and Spanish (all dialects). * The features expressive SSML, voice transformation
* SSML, and use of the `volume` attribute of the `&lt;prosody&gt;` element are deprecated and are
* not supported with any of the service's neural voices. * All of the service's voices are now
* customizable and generally available (GA) for production use.
*
* <p>The deprecated voices and features will continue to function for at least one year but might
* be removed at a future date. You are encouraged to migrate to the equivalent neural voices at
* your earliest convenience. For more information about all voice updates, see the [2 December
* 2020 service
* update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020)
* in the release notes for IBM Cloud.
*
* <p>### Warning messages
*
* <p>If a request includes invalid query parameters, the service returns a `Warnings` response
Expand Down Expand Up @@ -417,25 +384,10 @@ public WebSocket synthesizeUsingWebSocket(
* <p>**See also:** [Querying a word from a
* language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
*
* <p>### Important voice updates for IBM Cloud
*
* <p>The service's voices underwent significant change on 2 December 2020. * The Arabic, Chinese,
* Dutch, Australian English, and Korean voices are now neural instead of concatenative. * The
* `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. * The `ar-AR`
* language identifier cannot be used to create a custom model. Use the `ar-MS` identifier
* instead. * The standard concatenative voices for the following languages are now deprecated:
* Brazilian Portuguese, United Kingdom and United States English, French, German, Italian,
* Japanese, and Spanish (all dialects). * The features expressive SSML, voice transformation
* SSML, and use of the `volume` attribute of the `&lt;prosody&gt;` element are deprecated and are
* not supported with any of the service's neural voices. * All of the service's voices are now
* customizable and generally available (GA) for production use.
*
* <p>The deprecated voices and features will continue to function for at least one year but might
* be removed at a future date. You are encouraged to migrate to the equivalent neural voices at
* your earliest convenience. For more information about all voice updates, see the [2 December
* 2020 service
* update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020)
* in the release notes for IBM Cloud.
* <p>**Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English,
* Korean, and Swedish languages and voices are supported only for IBM Cloud; they are deprecated
* for IBM Cloud Pak for Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the
* `ar-MS_OmarVoice` voice instead.
*
* @param getPronunciationOptions the {@link GetPronunciationOptions} containing the options for
* the call
Expand Down Expand Up @@ -479,25 +431,10 @@ public ServiceCall<Pronunciation> getPronunciation(
* <p>**See also:** [Creating a custom
* model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
*
* <p>### Important voice updates for IBM Cloud
*
* <p>The service's voices underwent significant change on 2 December 2020. * The Arabic, Chinese,
* Dutch, Australian English, and Korean voices are now neural instead of concatenative. * The
* `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. * The `ar-AR`
* language identifier cannot be used to create a custom model. Use the `ar-MS` identifier
* instead. * The standard concatenative voices for the following languages are now deprecated:
* Brazilian Portuguese, United Kingdom and United States English, French, German, Italian,
* Japanese, and Spanish (all dialects). * The features expressive SSML, voice transformation
* SSML, and use of the `volume` attribute of the `&lt;prosody&gt;` element are deprecated and are
* not supported with any of the service's neural voices. * All of the service's voices are now
* customizable and generally available (GA) for production use.
*
* <p>The deprecated voices and features will continue to function for at least one year but might
* be removed at a future date. You are encouraged to migrate to the equivalent neural voices at
* your earliest convenience. For more information about all voice updates, see the [2 December
* 2020 service
* update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020)
* in the release notes for IBM Cloud.
* <p>**Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English,
* Korean, and Swedish languages and voices are supported only for IBM Cloud; they are deprecated
* for IBM Cloud Pak for Data. Also, the `ar-AR` language identifier cannot be used to create a
* custom model; use the `ar-MS` identifier instead.
*
* @param createCustomModelOptions the {@link CreateCustomModelOptions} containing the options for
* the call
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -20,17 +20,22 @@ public class CreateCustomModelOptions extends GenericModel {
/**
* The language of the new custom model. You create a custom model for a specific language, not
* for a specific voice. A custom model can be used with any voice for its specified language.
* Omit the parameter to use the the default language, `en-US`. **Note:** The `ar-AR` language
* identifier cannot be used to create a custom model. Use the `ar-MS` identifier instead.
* Omit the parameter to use the the default language, `en-US`.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
* <p>**Important:** If you are using the service on IBM Cloud Pak for Data _and_ you install the
* neural voices, the `language`parameter is required. You must specify the language for the
* custom model in the indicated format (for example, `en-AU` for Australian English). The request
* fails if you do not specify a language.
*/
public interface Language {
/** ar-MS. */
String AR_MS = "ar-MS";
/** cs-CZ. */
String CS_CZ = "cs-CZ";
/** de-DE. */
String DE_DE = "de-DE";
/** en-AU. */
String EN_AU = "en-AU";
/** en-GB. */
String EN_GB = "en-GB";
/** en-US. */
Expand All @@ -57,6 +62,8 @@ public interface Language {
String NL_NL = "nl-NL";
/** pt-BR. */
String PT_BR = "pt-BR";
/** sv-SE. */
String SV_SE = "sv-SE";
/** zh-CN. */
String ZH_CN = "zh-CN";
}
Expand Down Expand Up @@ -164,11 +171,12 @@ public String name() {
*
* <p>The language of the new custom model. You create a custom model for a specific language, not
* for a specific voice. A custom model can be used with any voice for its specified language.
* Omit the parameter to use the the default language, `en-US`. **Note:** The `ar-AR` language
* identifier cannot be used to create a custom model. Use the `ar-MS` identifier instead.
* Omit the parameter to use the the default language, `en-US`.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
* <p>**Important:** If you are using the service on IBM Cloud Pak for Data _and_ you install the
* neural voices, the `language`parameter is required. You must specify the language for the
* custom model in the indicated format (for example, `en-AU` for Australian English). The request
* fails if you do not specify a language.
*
* @return the language
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -19,18 +19,15 @@ public class GetPronunciationOptions extends GenericModel {

/**
* A voice that specifies the language in which the pronunciation is to be returned. All voices
* for the same language (for example, `en-US`) return the same translation. For more information
* about specifying a voice, see **Important voice updates for IBM Cloud** in the method
* description.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
* for the same language (for example, `en-US`) return the same translation.
*/
public interface Voice {
/** ar-AR_OmarVoice. */
String AR_AR_OMARVOICE = "ar-AR_OmarVoice";
/** ar-MS_OmarVoice. */
String AR_MS_OMARVOICE = "ar-MS_OmarVoice";
/** cs-CZ_AlenaVoice. */
String CS_CZ_ALENAVOICE = "cs-CZ_AlenaVoice";
/** de-DE_BirgitVoice. */
String DE_DE_BIRGITVOICE = "de-DE_BirgitVoice";
/** de-DE_BirgitV3Voice. */
Expand All @@ -41,10 +38,12 @@ public interface Voice {
String DE_DE_DIETERV3VOICE = "de-DE_DieterV3Voice";
/** de-DE_ErikaV3Voice. */
String DE_DE_ERIKAV3VOICE = "de-DE_ErikaV3Voice";
/** en-AU-CraigVoice. */
String EN_AU_CRAIGVOICE = "en-AU-CraigVoice";
/** en-AU-MadisonVoice. */
String EN_AU_MADISONVOICE = "en-AU-MadisonVoice";
/** en-AU_CraigVoice. */
String EN_AU_CRAIGVOICE = "en-AU_CraigVoice";
/** en-AU_MadisonVoice. */
String EN_AU_MADISONVOICE = "en-AU_MadisonVoice";
/** en-AU_SteveVoice. */
String EN_AU_STEVEVOICE = "en-AU_SteveVoice";
/** en-GB_CharlotteV3Voice. */
String EN_GB_CHARLOTTEV3VOICE = "en-GB_CharlotteV3Voice";
/** en-GB_JamesV3Voice. */
Expand Down Expand Up @@ -115,6 +114,8 @@ public interface Voice {
String KO_KR_YUNAVOICE = "ko-KR_YunaVoice";
/** nl-BE_AdeleVoice. */
String NL_BE_ADELEVOICE = "nl-BE_AdeleVoice";
/** nl-BE_BramVoice. */
String NL_BE_BRAMVOICE = "nl-BE_BramVoice";
/** nl-NL_EmmaVoice. */
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
/** nl-NL_LiamVoice. */
Expand All @@ -123,6 +124,8 @@ public interface Voice {
String PT_BR_ISABELAVOICE = "pt-BR_IsabelaVoice";
/** pt-BR_IsabelaV3Voice. */
String PT_BR_ISABELAV3VOICE = "pt-BR_IsabelaV3Voice";
/** sv-SE_IngridVoice. */
String SV_SE_INGRIDVOICE = "sv-SE_IngridVoice";
/** zh-CN_LiNaVoice. */
String ZH_CN_LINAVOICE = "zh-CN_LiNaVoice";
/** zh-CN_WangWeiVoice. */
Expand Down Expand Up @@ -260,12 +263,7 @@ public String text() {
* Gets the voice.
*
* <p>A voice that specifies the language in which the pronunciation is to be returned. All voices
* for the same language (for example, `en-US`) return the same translation. For more information
* about specifying a voice, see **Important voice updates for IBM Cloud** in the method
* description.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
* for the same language (for example, `en-US`) return the same translation.
*
* @return the voice
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -17,18 +17,14 @@
/** The getVoice options. */
public class GetVoiceOptions extends GenericModel {

/**
* The voice for which information is to be returned. For more information about specifying a
* voice, see **Important voice updates for IBM Cloud** in the method description.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
*/
/** The voice for which information is to be returned. */
public interface Voice {
/** ar-AR_OmarVoice. */
String AR_AR_OMARVOICE = "ar-AR_OmarVoice";
/** ar-MS_OmarVoice. */
String AR_MS_OMARVOICE = "ar-MS_OmarVoice";
/** cs-CZ_AlenaVoice. */
String CS_CZ_ALENAVOICE = "cs-CZ_AlenaVoice";
/** de-DE_BirgitVoice. */
String DE_DE_BIRGITVOICE = "de-DE_BirgitVoice";
/** de-DE_BirgitV3Voice. */
Expand All @@ -39,10 +35,12 @@ public interface Voice {
String DE_DE_DIETERV3VOICE = "de-DE_DieterV3Voice";
/** de-DE_ErikaV3Voice. */
String DE_DE_ERIKAV3VOICE = "de-DE_ErikaV3Voice";
/** en-AU-CraigVoice. */
String EN_AU_CRAIGVOICE = "en-AU-CraigVoice";
/** en-AU-MadisonVoice. */
String EN_AU_MADISONVOICE = "en-AU-MadisonVoice";
/** en-AU_CraigVoice. */
String EN_AU_CRAIGVOICE = "en-AU_CraigVoice";
/** en-AU_MadisonVoice. */
String EN_AU_MADISONVOICE = "en-AU_MadisonVoice";
/** en-AU_SteveVoice. */
String EN_AU_STEVEVOICE = "en-AU_SteveVoice";
/** en-GB_CharlotteV3Voice. */
String EN_GB_CHARLOTTEV3VOICE = "en-GB_CharlotteV3Voice";
/** en-GB_JamesV3Voice. */
Expand Down Expand Up @@ -113,6 +111,8 @@ public interface Voice {
String KO_KR_YUNAVOICE = "ko-KR_YunaVoice";
/** nl-BE_AdeleVoice. */
String NL_BE_ADELEVOICE = "nl-BE_AdeleVoice";
/** nl-BE_BramVoice. */
String NL_BE_BRAMVOICE = "nl-BE_BramVoice";
/** nl-NL_EmmaVoice. */
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
/** nl-NL_LiamVoice. */
Expand All @@ -121,6 +121,8 @@ public interface Voice {
String PT_BR_ISABELAVOICE = "pt-BR_IsabelaVoice";
/** pt-BR_IsabelaV3Voice. */
String PT_BR_ISABELAV3VOICE = "pt-BR_IsabelaV3Voice";
/** sv-SE_IngridVoice. */
String SV_SE_INGRIDVOICE = "sv-SE_IngridVoice";
/** zh-CN_LiNaVoice. */
String ZH_CN_LINAVOICE = "zh-CN_LiNaVoice";
/** zh-CN_WangWeiVoice. */
Expand Down Expand Up @@ -204,11 +206,7 @@ public Builder newBuilder() {
/**
* Gets the voice.
*
* <p>The voice for which information is to be returned. For more information about specifying a
* voice, see **Important voice updates for IBM Cloud** in the method description.
*
* <p>**IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and
* voices are supported only for IBM Cloud.
* <p>The voice for which information is to be returned.
*
* @return the voice
*/
Expand Down
Loading

0 comments on commit 40cd035

Please sign in to comment.