Skip to content

Commit

Permalink
feat(text-to-speech): auto-generate code
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Apr 23, 2020
1 parent 2261d67 commit 87be679
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
* words that, 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).
* Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages support only IPA.
*
* @version v1
* @see <a href="https://cloud.ibm.com/docs/text-to-speech/">Text to Speech</a>
Expand Down Expand Up @@ -321,11 +321,10 @@ public WebSocket synthesizeUsingWebSocket(
* default translation for the language of that voice or for a specific custom voice model to see
* the translation for that voice model.
*
* <p>**Note:** This method is currently a beta release. The method does not support the Arabic,
* Chinese, and Dutch languages.
* <p>**Note:** This method is currently a beta release.
*
* <p>**See also:** [Querying a word from a language]
* (https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
* <p>**See also:** [Querying a word from a
* language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
*
* @param getPronunciationOptions the {@link GetPronunciationOptions} containing the options for
* the call
Expand Down Expand Up @@ -367,8 +366,7 @@ public ServiceCall<Pronunciation> getPronunciation(
* You can optionally specify the language and a description for the new model. The model is owned
* by the instance of the service whose credentials are used to create it.
*
* <p>**Note:** This method is currently a beta release. The service does not support voice model
* customization for the Arabic, Chinese, and Dutch languages.
* <p>**Note:** This method is currently a beta release.
*
* <p>**See also:** [Creating a custom
* model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
Expand Down Expand Up @@ -805,8 +803,8 @@ public ServiceCall<Void> deleteWord(DeleteWordOptions deleteWordOptions) {
* <p>You associate a customer ID with data by passing the `X-Watson-Metadata` header with a
* request that passes the data.
*
* <p>**See also:** [Information security] (https://cloud.ibm.com/docs/text-to-speech
* ?topic=text-to-speech-information-security#information-security).
* <p>**See also:** [Information
* security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-information-security#information-security).
*
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
* call
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ public String word() {
*
* <p>The phonetic or sounds-like translation for the word. A phonetic translation is based on the
* SSML format for representing the phonetic string of a word either as an IPA translation or as
* an IBM SPR translation. A sounds-like is one or more words that, when combined, sound like the
* word.
* an IBM SPR translation. The Arabic, Chinese, Dutch, and Korean languages support only IPA. A
* sounds-like is one or more words that, when combined, sound like the word.
*
* @return the translation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@
public class CreateVoiceModelOptions extends GenericModel {

/**
* The language of the new custom voice model. Omit the parameter to use the the default language,
* The language of the new custom voice model. You create a custom voice model for a specific
* language, not for a specific voice. A custom model can be used with any voice, standard or
* neural, for its specified language. Omit the parameter to use the the default language,
* `en-US`.
*/
public interface Language {
/** ar-AR. */
String AR_AR = "ar-AR";
/** de-DE. */
String DE_DE = "de-DE";
/** en-GB. */
Expand All @@ -40,8 +44,14 @@ public interface Language {
String IT_IT = "it-IT";
/** ja-JP. */
String JA_JP = "ja-JP";
/** ko-KR. */
String KO_KR = "ko-KR";
/** nl-NL. */
String NL_NL = "nl-NL";
/** pt-BR. */
String PT_BR = "pt-BR";
/** zh-CN. */
String ZH_CN = "zh-CN";
}

protected String name;
Expand Down Expand Up @@ -145,8 +155,10 @@ public String name() {
/**
* Gets the language.
*
* <p>The language of the new custom voice model. Omit the parameter to use the the default
* language, `en-US`.
* <p>The language of the new custom voice model. You create a custom voice model for a specific
* language, not for a specific voice. A custom model can be used with any voice, standard or
* neural, for its specified language. Omit the parameter to use the the default language,
* `en-US`.
*
* @return the language
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class GetPronunciationOptions extends GenericModel {
* 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";
/** de-DE_BirgitVoice. */
String DE_DE_BIRGITVOICE = "de-DE_BirgitVoice";
/** de-DE_BirgitV3Voice. */
Expand All @@ -30,6 +32,8 @@ public interface Voice {
String DE_DE_DIETERVOICE = "de-DE_DieterVoice";
/** de-DE_DieterV3Voice. */
String DE_DE_DIETERV3VOICE = "de-DE_DieterV3Voice";
/** de-DE_ErikaV3Voice. */
String DE_DE_ERIKAV3VOICE = "de-DE_ErikaV3Voice";
/** en-GB_KateVoice. */
String EN_GB_KATEVOICE = "en-GB_KateVoice";
/** en-GB_KateV3Voice. */
Expand All @@ -38,6 +42,12 @@ public interface Voice {
String EN_US_ALLISONVOICE = "en-US_AllisonVoice";
/** en-US_AllisonV3Voice. */
String EN_US_ALLISONV3VOICE = "en-US_AllisonV3Voice";
/** en-US_EmilyV3Voice. */
String EN_US_EMILYV3VOICE = "en-US_EmilyV3Voice";
/** en-US_HenryV3Voice. */
String EN_US_HENRYV3VOICE = "en-US_HenryV3Voice";
/** en-US_KevinV3Voice. */
String EN_US_KEVINV3VOICE = "en-US_KevinV3Voice";
/** en-US_LisaVoice. */
String EN_US_LISAVOICE = "en-US_LisaVoice";
/** en-US_LisaV3Voice. */
Expand All @@ -46,6 +56,8 @@ public interface Voice {
String EN_US_MICHAELVOICE = "en-US_MichaelVoice";
/** en-US_MichaelV3Voice. */
String EN_US_MICHAELV3VOICE = "en-US_MichaelV3Voice";
/** en-US_OliviaV3Voice. */
String EN_US_OLIVIAV3VOICE = "en-US_OliviaV3Voice";
/** es-ES_EnriqueVoice. */
String ES_ES_ENRIQUEVOICE = "es-ES_EnriqueVoice";
/** es-ES_EnriqueV3Voice. */
Expand Down Expand Up @@ -74,15 +86,30 @@ public interface Voice {
String JA_JP_EMIVOICE = "ja-JP_EmiVoice";
/** ja-JP_EmiV3Voice. */
String JA_JP_EMIV3VOICE = "ja-JP_EmiV3Voice";
/** ko-KR_YoungmiVoice. */
String KO_KR_YOUNGMIVOICE = "ko-KR_YoungmiVoice";
/** ko-KR_YunaVoice. */
String KO_KR_YUNAVOICE = "ko-KR_YunaVoice";
/** nl-NL_EmmaVoice. */
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
/** nl-NL_LiamVoice. */
String NL_NL_LIAMVOICE = "nl-NL_LiamVoice";
/** pt-BR_IsabelaVoice. */
String PT_BR_ISABELAVOICE = "pt-BR_IsabelaVoice";
/** pt-BR_IsabelaV3Voice. */
String PT_BR_ISABELAV3VOICE = "pt-BR_IsabelaV3Voice";
/** zh-CN_LiNaVoice. */
String ZH_CN_LINAVOICE = "zh-CN_LiNaVoice";
/** zh-CN_WangWeiVoice. */
String ZH_CN_WANGWEIVOICE = "zh-CN_WangWeiVoice";
/** zh-CN_ZhangJingVoice. */
String ZH_CN_ZHANGJINGVOICE = "zh-CN_ZhangJingVoice";
}

/**
* The phoneme format in which to return the pronunciation. Omit the parameter to obtain the
* pronunciation in the default format.
* The phoneme format in which to return the pronunciation. The Arabic, Chinese, Dutch, and Korean
* languages support only IPA. Omit the parameter to obtain the pronunciation in the default
* format.
*/
public interface Format {
/** ibm. */
Expand Down Expand Up @@ -219,8 +246,9 @@ public String voice() {
/**
* Gets the format.
*
* <p>The phoneme format in which to return the pronunciation. Omit the parameter to obtain the
* pronunciation in the default format.
* <p>The phoneme format in which to return the pronunciation. The Arabic, Chinese, Dutch, and
* Korean languages support only IPA. Omit the parameter to obtain the pronunciation in the
* default format.
*
* @return the format
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class GetVoiceOptions extends GenericModel {

/** The voice for which information is to be returned. */
public interface Voice {
/** ar-AR_OmarVoice. */
String AR_AR_OMARVOICE = "ar-AR_OmarVoice";
/** de-DE_BirgitVoice. */
String DE_DE_BIRGITVOICE = "de-DE_BirgitVoice";
/** de-DE_BirgitV3Voice. */
Expand All @@ -27,6 +29,8 @@ public interface Voice {
String DE_DE_DIETERVOICE = "de-DE_DieterVoice";
/** de-DE_DieterV3Voice. */
String DE_DE_DIETERV3VOICE = "de-DE_DieterV3Voice";
/** de-DE_ErikaV3Voice. */
String DE_DE_ERIKAV3VOICE = "de-DE_ErikaV3Voice";
/** en-GB_KateVoice. */
String EN_GB_KATEVOICE = "en-GB_KateVoice";
/** en-GB_KateV3Voice. */
Expand All @@ -35,6 +39,12 @@ public interface Voice {
String EN_US_ALLISONVOICE = "en-US_AllisonVoice";
/** en-US_AllisonV3Voice. */
String EN_US_ALLISONV3VOICE = "en-US_AllisonV3Voice";
/** en-US_EmilyV3Voice. */
String EN_US_EMILYV3VOICE = "en-US_EmilyV3Voice";
/** en-US_HenryV3Voice. */
String EN_US_HENRYV3VOICE = "en-US_HenryV3Voice";
/** en-US_KevinV3Voice. */
String EN_US_KEVINV3VOICE = "en-US_KevinV3Voice";
/** en-US_LisaVoice. */
String EN_US_LISAVOICE = "en-US_LisaVoice";
/** en-US_LisaV3Voice. */
Expand All @@ -43,6 +53,8 @@ public interface Voice {
String EN_US_MICHAELVOICE = "en-US_MichaelVoice";
/** en-US_MichaelV3Voice. */
String EN_US_MICHAELV3VOICE = "en-US_MichaelV3Voice";
/** en-US_OliviaV3Voice. */
String EN_US_OLIVIAV3VOICE = "en-US_OliviaV3Voice";
/** es-ES_EnriqueVoice. */
String ES_ES_ENRIQUEVOICE = "es-ES_EnriqueVoice";
/** es-ES_EnriqueV3Voice. */
Expand Down Expand Up @@ -71,10 +83,24 @@ public interface Voice {
String JA_JP_EMIVOICE = "ja-JP_EmiVoice";
/** ja-JP_EmiV3Voice. */
String JA_JP_EMIV3VOICE = "ja-JP_EmiV3Voice";
/** ko-KR_YoungmiVoice. */
String KO_KR_YOUNGMIVOICE = "ko-KR_YoungmiVoice";
/** ko-KR_YunaVoice. */
String KO_KR_YUNAVOICE = "ko-KR_YunaVoice";
/** nl-NL_EmmaVoice. */
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
/** nl-NL_LiamVoice. */
String NL_NL_LIAMVOICE = "nl-NL_LiamVoice";
/** pt-BR_IsabelaVoice. */
String PT_BR_ISABELAVOICE = "pt-BR_IsabelaVoice";
/** pt-BR_IsabelaV3Voice. */
String PT_BR_ISABELAV3VOICE = "pt-BR_IsabelaV3Voice";
/** zh-CN_LiNaVoice. */
String ZH_CN_LINAVOICE = "zh-CN_LiNaVoice";
/** zh-CN_WangWeiVoice. */
String ZH_CN_WANGWEIVOICE = "zh-CN_WangWeiVoice";
/** zh-CN_ZhangJingVoice. */
String ZH_CN_ZHANGJINGVOICE = "zh-CN_ZhangJingVoice";
}

protected String voice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class ListVoiceModelsOptions extends GenericModel {
* be returned. Omit the parameter to see all custom voice models that are owned by the requester.
*/
public interface Language {
/** ar-AR. */
String AR_AR = "ar-AR";
/** de-DE. */
String DE_DE = "de-DE";
/** en-GB. */
Expand All @@ -40,8 +42,14 @@ public interface Language {
String IT_IT = "it-IT";
/** ja-JP. */
String JA_JP = "ja-JP";
/** ko-KR. */
String KO_KR = "ko-KR";
/** nl-NL. */
String NL_NL = "nl-NL";
/** pt-BR. */
String PT_BR = "pt-BR";
/** zh-CN. */
String ZH_CN = "zh-CN";
}

protected String language;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public interface Voice {
String DE_DE_DIETERVOICE = "de-DE_DieterVoice";
/** de-DE_DieterV3Voice. */
String DE_DE_DIETERV3VOICE = "de-DE_DieterV3Voice";
/** de-DE_ErikaV3Voice. */
String DE_DE_ERIKAV3VOICE = "de-DE_ErikaV3Voice";
/** en-GB_KateVoice. */
String EN_GB_KATEVOICE = "en-GB_KateVoice";
/** en-GB_KateV3Voice. */
Expand All @@ -38,6 +40,12 @@ public interface Voice {
String EN_US_ALLISONVOICE = "en-US_AllisonVoice";
/** en-US_AllisonV3Voice. */
String EN_US_ALLISONV3VOICE = "en-US_AllisonV3Voice";
/** en-US_EmilyV3Voice. */
String EN_US_EMILYV3VOICE = "en-US_EmilyV3Voice";
/** en-US_HenryV3Voice. */
String EN_US_HENRYV3VOICE = "en-US_HenryV3Voice";
/** en-US_KevinV3Voice. */
String EN_US_KEVINV3VOICE = "en-US_KevinV3Voice";
/** en-US_LisaVoice. */
String EN_US_LISAVOICE = "en-US_LisaVoice";
/** en-US_LisaV3Voice. */
Expand All @@ -46,6 +54,8 @@ public interface Voice {
String EN_US_MICHAELVOICE = "en-US_MichaelVoice";
/** en-US_MichaelV3Voice. */
String EN_US_MICHAELV3VOICE = "en-US_MichaelV3Voice";
/** en-US_OliviaV3Voice. */
String EN_US_OLIVIAV3VOICE = "en-US_OliviaV3Voice";
/** es-ES_EnriqueVoice. */
String ES_ES_ENRIQUEVOICE = "es-ES_EnriqueVoice";
/** es-ES_EnriqueV3Voice. */
Expand Down Expand Up @@ -74,6 +84,10 @@ public interface Voice {
String JA_JP_EMIVOICE = "ja-JP_EmiVoice";
/** ja-JP_EmiV3Voice. */
String JA_JP_EMIV3VOICE = "ja-JP_EmiV3Voice";
/** ko-KR_YoungmiVoice. */
String KO_KR_YOUNGMIVOICE = "ko-KR_YoungmiVoice";
/** ko-KR_YunaVoice. */
String KO_KR_YUNAVOICE = "ko-KR_YunaVoice";
/** nl-NL_EmmaVoice. */
String NL_NL_EMMAVOICE = "nl-NL_EmmaVoice";
/** nl-NL_LiamVoice. */
Expand Down Expand Up @@ -246,10 +260,9 @@ public String voice() {
* Gets the customizationId.
*
* <p>The customization ID (GUID) of a custom voice model to use for the synthesis. If a custom
* voice model is specified, it is guaranteed to work only if it matches the language of the
* indicated voice. You must make the request with credentials for the instance of the service
* that owns the custom model. Omit the parameter to use the specified voice with no
* customization.
* voice model is specified, it works only if it matches the language of the indicated voice. You
* must make the request with credentials for the instance of the service that owns the custom
* model. Omit the parameter to use the specified voice with no customization.
*
* @return the customizationId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public Builder newBuilder() {
*
* <p>The phonetic or sounds-like translation for the word. A phonetic translation is based on the
* SSML format for representing the phonetic string of a word either as an IPA translation or as
* an IBM SPR translation. A sounds-like is one or more words that, when combined, sound like the
* word.
* an IBM SPR translation. The Arabic, Chinese, Dutch, and Korean languages support only IPA. A
* sounds-like is one or more words that, when combined, sound like the word.
*
* @return the translation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public Builder newBuilder() {
/**
* Gets the word.
*
* <p>The word for the custom voice model.
* <p>The word for the custom voice model. The maximum length of a word is 49 characters.
*
* @return the word
*/
Expand All @@ -171,8 +171,9 @@ public String word() {
*
* <p>The phonetic or sounds-like translation for the word. A phonetic translation is based on the
* SSML format for representing the phonetic string of a word either as an IPA or IBM SPR
* translation. A sounds-like translation consists of one or more words that, when combined, sound
* like the word.
* translation. The Arabic, Chinese, Dutch, and Korean languages support only IPA. A sounds-like
* translation consists of one or more words that, when combined, sound like the word. The maximum
* length of a translation is 499 characters.
*
* @return the translation
*/
Expand Down

0 comments on commit 87be679

Please sign in to comment.