Skip to content

Commit

Permalink
feat(speech-to-text-v1): add more languages supported for next genera…
Browse files Browse the repository at this point in the history
…tion models
  • Loading branch information
kevinkowa committed Sep 9, 2021
1 parent 5776b7b commit c03ea09
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 53 deletions.
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2021.
*
* 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 @@ -21,30 +21,44 @@ public class CreateLanguageModelOptions extends GenericModel {
* The name of the base language model that is to be customized by the new custom language model.
* The new custom model can be used only with the base model that it customizes.
*
* <p>To determine whether a base model supports language model customization, use the **Get a
* model** method and check that the attribute `custom_language_model` is set to `true`. You can
* also refer to [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* <p>To determine whether a base model supports language model customization, use the [Get a
* model](#getmodel) method and check that the attribute `custom_language_model` is set to `true`.
* You can also refer to [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*/
public interface BaseModelName {
/** ar-MS_Telephony. */
String AR_MS_TELEPHONY = "ar-MS_Telephony";
/** de-DE_BroadbandModel. */
String DE_DE_BROADBANDMODEL = "de-DE_BroadbandModel";
/** de-DE_NarrowbandModel. */
String DE_DE_NARROWBANDMODEL = "de-DE_NarrowbandModel";
/** de-DE_Telephony. */
String DE_DE_TELEPHONY = "de-DE_Telephony";
/** en-AU_BroadbandModel. */
String EN_AU_BROADBANDMODEL = "en-AU_BroadbandModel";
/** en-AU_NarrowbandModel. */
String EN_AU_NARROWBANDMODEL = "en-AU_NarrowbandModel";
/** en-AU_Telephony. */
String EN_AU_TELEPHONY = "en-AU_Telephony";
/** en-GB_BroadbandModel. */
String EN_GB_BROADBANDMODEL = "en-GB_BroadbandModel";
/** en-GB_NarrowbandModel. */
String EN_GB_NARROWBANDMODEL = "en-GB_NarrowbandModel";
/** en-GB_Telephony. */
String EN_GB_TELEPHONY = "en-GB_Telephony";
/** en-IN_Telephony. */
String EN_IN_TELEPHONY = "en-IN_Telephony";
/** en-US_BroadbandModel. */
String EN_US_BROADBANDMODEL = "en-US_BroadbandModel";
/** en-US_Multimedia. */
String EN_US_MULTIMEDIA = "en-US_Multimedia";
/** en-US_NarrowbandModel. */
String EN_US_NARROWBANDMODEL = "en-US_NarrowbandModel";
/** en-US_ShortForm_NarrowbandModel. */
String EN_US_SHORTFORM_NARROWBANDMODEL = "en-US_ShortForm_NarrowbandModel";
/** en-US_Telephony. */
String EN_US_TELEPHONY = "en-US_Telephony";
/** es-AR_BroadbandModel. */
String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel";
/** es-AR_NarrowbandModel. */
Expand All @@ -61,6 +75,8 @@ public interface BaseModelName {
String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel";
/** es-ES_NarrowbandModel. */
String ES_ES_NARROWBANDMODEL = "es-ES_NarrowbandModel";
/** es-ES_Telephony. */
String ES_ES_TELEPHONY = "es-ES_Telephony";
/** es-MX_BroadbandModel. */
String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel";
/** es-MX_NarrowbandModel. */
Expand All @@ -73,22 +89,40 @@ public interface BaseModelName {
String FR_CA_BROADBANDMODEL = "fr-CA_BroadbandModel";
/** fr-CA_NarrowbandModel. */
String FR_CA_NARROWBANDMODEL = "fr-CA_NarrowbandModel";
/** fr-CA_Telephony. */
String FR_CA_TELEPHONY = "fr-CA_Telephony";
/** fr-FR_BroadbandModel. */
String FR_FR_BROADBANDMODEL = "fr-FR_BroadbandModel";
/** fr-FR_Multimedia. */
String FR_FR_MULTIMEDIA = "fr-FR_Multimedia";
/** fr-FR_NarrowbandModel. */
String FR_FR_NARROWBANDMODEL = "fr-FR_NarrowbandModel";
/** fr-FR_Telephony. */
String FR_FR_TELEPHONY = "fr-FR_Telephony";
/** hi-IN_Telephony. */
String HI_IN_TELEPHONY = "hi-IN_Telephony";
/** it-IT_BroadbandModel. */
String IT_IT_BROADBANDMODEL = "it-IT_BroadbandModel";
/** it-IT_NarrowbandModel. */
String IT_IT_NARROWBANDMODEL = "it-IT_NarrowbandModel";
/** it-IT_Telephony. */
String IT_IT_TELEPHONY = "it-IT_Telephony";
/** ja-JP_BroadbandModel. */
String JA_JP_BROADBANDMODEL = "ja-JP_BroadbandModel";
/** ja-JP_Multimedia. */
String JA_JP_MULTIMEDIA = "ja-JP_Multimedia";
/** ja-JP_NarrowbandModel. */
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
/** ko-KR_BroadbandModel. */
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
/** ko-KR_Multimedia. */
String KO_KR_MULTIMEDIA = "ko-KR_Multimedia";
/** ko-KR_NarrowbandModel. */
String KO_KR_NARROWBANDMODEL = "ko-KR_NarrowbandModel";
/** ko-KR_Telephony. */
String KO_KR_TELEPHONY = "ko-KR_Telephony";
/** nl-BE_Telephony. */
String NL_BE_TELEPHONY = "nl-BE_Telephony";
/** nl-NL_BroadbandModel. */
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
/** nl-NL_NarrowbandModel. */
Expand All @@ -97,6 +131,8 @@ public interface BaseModelName {
String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel";
/** pt-BR_NarrowbandModel. */
String PT_BR_NARROWBANDMODEL = "pt-BR_NarrowbandModel";
/** pt-BR_Telephony. */
String PT_BR_TELEPHONY = "pt-BR_Telephony";
}

protected String name;
Expand Down Expand Up @@ -225,10 +261,10 @@ public String name() {
* <p>The name of the base language model that is to be customized by the new custom language
* model. The new custom model can be used only with the base model that it customizes.
*
* <p>To determine whether a base model supports language model customization, use the **Get a
* model** method and check that the attribute `custom_language_model` is set to `true`. You can
* also refer to [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* <p>To determine whether a base model supports language model customization, use the [Get a
* model](#getmodel) method and check that the attribute `custom_language_model` is set to `true`.
* You can also refer to [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*
* @return the baseModelName
*/
Expand All @@ -241,20 +277,18 @@ public String baseModelName() {
*
* <p>The dialect of the specified language that is to be used with the custom language model. For
* most languages, the dialect matches the language of the base model by default. For example,
* `en-US` is used for either of the US English language models.
* `en-US` is used for the US English language models. All dialect values are case-insensitive.
*
* <p>For a Spanish language, the service creates a custom language model that is suited for
* speech in one of the following dialects: * `es-ES` for Castilian Spanish (`es-ES` models) *
* `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE` models) * `es-US`
* for Mexican (North American) Spanish (`es-MX` models)
* <p>The parameter is meaningful only for Spanish language models, for which you can always
* safely omit the parameter to have the service create the correct mapping. For Spanish, the
* service creates a custom language model that is suited for speech in one of the following
* dialects: * `es-ES` for Castilian Spanish (`es-ES` models) * `es-LA` for Latin American Spanish
* (`es-AR`, `es-CL`, `es-CO`, and `es-PE` models) * `es-US` for Mexican (North American) Spanish
* (`es-MX` models)
*
* <p>The parameter is meaningful only for Spanish models, for which you can always safely omit
* the parameter to have the service create the correct mapping.
*
* <p>If you specify the `dialect` parameter for non-Spanish language models, its value must match
* the language of the base model. If you specify the `dialect` for Spanish language models, its
* value must match one of the defined mappings as indicated (`es-ES`, `es-LA`, or `es-MX`). All
* dialect values are case-insensitive.
* <p>If you specify the `dialect` parameter for a non-Spanish language model, its value must
* match the language of the base model. If you specify the `dialect` for a Spanish language
* model, its value must match one of the defined mappings (`es-ES`, `es-LA`, or `es-MX`).
*
* @return the dialect
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2021.
*
* 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 @@ -18,9 +18,9 @@
public class GetModelOptions extends GenericModel {

/**
* The identifier of the model in the form of its name from the output of the **Get a model**
* method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel`
* instead.).
* The identifier of the model in the form of its name from the output of the [List
* models](#listmodels) method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
* `ar-MS_BroadbandModel` instead.).
*/
public interface ModelId {
/** ar-AR_BroadbandModel. */
Expand All @@ -47,6 +47,8 @@ public interface ModelId {
String EN_GB_NARROWBANDMODEL = "en-GB_NarrowbandModel";
/** en-GB_Telephony. */
String EN_GB_TELEPHONY = "en-GB_Telephony";
/** en-IN_Telephony. */
String EN_IN_TELEPHONY = "en-IN_Telephony";
/** en-US_BroadbandModel. */
String EN_US_BROADBANDMODEL = "en-US_BroadbandModel";
/** en-US_Multimedia. */
Expand Down Expand Up @@ -91,10 +93,14 @@ public interface ModelId {
String FR_CA_TELEPHONY = "fr-CA_Telephony";
/** fr-FR_BroadbandModel. */
String FR_FR_BROADBANDMODEL = "fr-FR_BroadbandModel";
/** fr-FR_Multimedia. */
String FR_FR_MULTIMEDIA = "fr-FR_Multimedia";
/** fr-FR_NarrowbandModel. */
String FR_FR_NARROWBANDMODEL = "fr-FR_NarrowbandModel";
/** fr-FR_Telephony. */
String FR_FR_TELEPHONY = "fr-FR_Telephony";
/** hi-IN_Telephony. */
String HI_IN_TELEPHONY = "hi-IN_Telephony";
/** it-IT_BroadbandModel. */
String IT_IT_BROADBANDMODEL = "it-IT_BroadbandModel";
/** it-IT_NarrowbandModel. */
Expand All @@ -103,12 +109,20 @@ public interface ModelId {
String IT_IT_TELEPHONY = "it-IT_Telephony";
/** ja-JP_BroadbandModel. */
String JA_JP_BROADBANDMODEL = "ja-JP_BroadbandModel";
/** ja-JP_Multimedia. */
String JA_JP_MULTIMEDIA = "ja-JP_Multimedia";
/** ja-JP_NarrowbandModel. */
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
/** ko-KR_BroadbandModel. */
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
/** ko-KR_Multimedia. */
String KO_KR_MULTIMEDIA = "ko-KR_Multimedia";
/** ko-KR_NarrowbandModel. */
String KO_KR_NARROWBANDMODEL = "ko-KR_NarrowbandModel";
/** ko-KR_Telephony. */
String KO_KR_TELEPHONY = "ko-KR_Telephony";
/** nl-BE_Telephony. */
String NL_BE_TELEPHONY = "nl-BE_Telephony";
/** nl-NL_BroadbandModel. */
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
/** nl-NL_NarrowbandModel. */
Expand Down Expand Up @@ -185,9 +199,9 @@ public Builder newBuilder() {
/**
* Gets the modelId.
*
* <p>The identifier of the model in the form of its name from the output of the **Get a model**
* method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel`
* instead.).
* <p>The identifier of the model in the form of its name from the output of the [List
* models](#listmodels) method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
* `ar-MS_BroadbandModel` instead.).
*
* @return the modelId
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2021.
*
* 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 @@ -24,7 +24,7 @@ public class ListAcousticModelsOptions extends GenericModel {
* `ar-MS` instead.)
*
* <p>To determine the languages for which customization is available, see [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*/
public interface Language {
/** ar-AR. */
Expand All @@ -37,6 +37,8 @@ public interface Language {
String EN_AU = "en-AU";
/** en-GB. */
String EN_GB = "en-GB";
/** en-IN. */
String EN_IN = "en-IN";
/** en-US. */
String EN_US = "en-US";
/** es-AR. */
Expand All @@ -55,12 +57,16 @@ public interface Language {
String FR_CA = "fr-CA";
/** fr-FR. */
String FR_FR = "fr-FR";
/** hi-IN. */
String HI_IN = "hi-IN";
/** it-IT. */
String IT_IT = "it-IT";
/** ja-JP. */
String JA_JP = "ja-JP";
/** ko-KR. */
String KO_KR = "ko-KR";
/** nl-BE. */
String NL_BE = "nl-BE";
/** nl-NL. */
String NL_NL = "nl-NL";
/** pt-BR. */
Expand Down Expand Up @@ -125,7 +131,7 @@ public Builder newBuilder() {
* `ar-MS` instead.)
*
* <p>To determine the languages for which customization is available, see [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*
* @return the language
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2021.
*
* 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 @@ -24,7 +24,7 @@ public class ListLanguageModelsOptions extends GenericModel {
* `ar-MS` instead.)
*
* <p>To determine the languages for which customization is available, see [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*/
public interface Language {
/** ar-AR. */
Expand All @@ -37,6 +37,8 @@ public interface Language {
String EN_AU = "en-AU";
/** en-GB. */
String EN_GB = "en-GB";
/** en-IN. */
String EN_IN = "en-IN";
/** en-US. */
String EN_US = "en-US";
/** es-AR. */
Expand All @@ -55,12 +57,16 @@ public interface Language {
String FR_CA = "fr-CA";
/** fr-FR. */
String FR_FR = "fr-FR";
/** hi-IN. */
String HI_IN = "hi-IN";
/** it-IT. */
String IT_IT = "it-IT";
/** ja-JP. */
String JA_JP = "ja-JP";
/** ko-KR. */
String KO_KR = "ko-KR";
/** nl-BE. */
String NL_BE = "nl-BE";
/** nl-NL. */
String NL_NL = "nl-NL";
/** pt-BR. */
Expand Down Expand Up @@ -125,7 +131,7 @@ public Builder newBuilder() {
* `ar-MS` instead.)
*
* <p>To determine the languages for which customization is available, see [Language support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
*
* @return the language
*/
Expand Down

0 comments on commit c03ea09

Please sign in to comment.