Skip to content

Commit

Permalink
feat(speech-to-text-v1): supportedFeatures: customAcousticModel prope…
Browse files Browse the repository at this point in the history
…rty added & update comments
  • Loading branch information
kevinkowa committed Mar 15, 2022
1 parent b52d05d commit 62e4f8e
Show file tree
Hide file tree
Showing 15 changed files with 385 additions and 225 deletions.

Large diffs are not rendered by default.

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 Down Expand Up @@ -116,8 +116,8 @@ public String getLanguage() {
*
* <p>A list of the available versions of the custom acoustic model. Each element of the array
* indicates a version of the base model with which the custom model can be used. Multiple
* versions exist only if the custom model has been upgraded; otherwise, only a single version is
* shown.
* versions exist only if the custom model has been upgraded to a new version of its base model.
* Otherwise, only a single version is shown.
*
* @return the versions
*/
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 @@ -24,7 +24,7 @@ public class CreateAcousticModelOptions extends GenericModel {
*
* <p>To determine whether a base model supports acoustic model customization, refer to [Language
* support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
*/
public interface BaseModelName {
/** ar-AR_BroadbandModel. */
Expand Down Expand Up @@ -221,7 +221,7 @@ public String name() {
*
* <p>To determine whether a base model supports acoustic model customization, refer to [Language
* support for
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
*
* @return the baseModelName
*/
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 @@ -25,11 +25,9 @@ public class CreateJobOptions extends GenericModel {

/**
* The identifier of the model that is to be used for the recognition request. (**Note:** The
* model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See
* [Previous-generation languages and
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and
* [Next-generation languages and
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
* model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See [Using a
* model for speech
* recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use).
*/
public interface Model {
/** ar-AR_BroadbandModel. */
Expand All @@ -38,6 +36,8 @@ public interface Model {
String AR_MS_BROADBANDMODEL = "ar-MS_BroadbandModel";
/** ar-MS_Telephony. */
String AR_MS_TELEPHONY = "ar-MS_Telephony";
/** cs-CZ_Telephony. */
String CS_CZ_TELEPHONY = "cs-CZ_Telephony";
/** de-DE_BroadbandModel. */
String DE_DE_BROADBANDMODEL = "de-DE_BroadbandModel";
/** de-DE_NarrowbandModel. */
Expand All @@ -46,6 +46,8 @@ public interface Model {
String DE_DE_TELEPHONY = "de-DE_Telephony";
/** en-AU_BroadbandModel. */
String EN_AU_BROADBANDMODEL = "en-AU_BroadbandModel";
/** en-AU_Multimedia. */
String EN_AU_MULTIMEDIA = "en-AU_Multimedia";
/** en-AU_NarrowbandModel. */
String EN_AU_NARROWBANDMODEL = "en-AU_NarrowbandModel";
/** en-AU_Telephony. */
Expand All @@ -54,6 +56,8 @@ public interface Model {
String EN_IN_TELEPHONY = "en-IN_Telephony";
/** en-GB_BroadbandModel. */
String EN_GB_BROADBANDMODEL = "en-GB_BroadbandModel";
/** en-GB_Multimedia. */
String EN_GB_MULTIMEDIA = "en-GB_Multimedia";
/** en-GB_NarrowbandModel. */
String EN_GB_NARROWBANDMODEL = "en-GB_NarrowbandModel";
/** en-GB_Telephony. */
Expand All @@ -68,6 +72,8 @@ public interface Model {
String EN_US_SHORTFORM_NARROWBANDMODEL = "en-US_ShortForm_NarrowbandModel";
/** en-US_Telephony. */
String EN_US_TELEPHONY = "en-US_Telephony";
/** en-WW_Medical_Telephony. */
String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony";
/** es-AR_BroadbandModel. */
String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel";
/** es-AR_NarrowbandModel. */
Expand All @@ -84,8 +90,12 @@ public interface Model {
String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel";
/** es-ES_NarrowbandModel. */
String ES_ES_NARROWBANDMODEL = "es-ES_NarrowbandModel";
/** es-ES_Multimedia. */
String ES_ES_MULTIMEDIA = "es-ES_Multimedia";
/** es-ES_Telephony. */
String ES_ES_TELEPHONY = "es-ES_Telephony";
/** es-LA_Telephony. */
String ES_LA_TELEPHONY = "es-LA_Telephony";
/** es-MX_BroadbandModel. */
String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel";
/** es-MX_NarrowbandModel. */
Expand Down Expand Up @@ -136,6 +146,8 @@ public interface Model {
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
/** nl-NL_NarrowbandModel. */
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel";
/** nl-NL_Telephony. */
String NL_NL_TELEPHONY = "nl-NL_Telephony";
/** pt-BR_BroadbandModel. */
String PT_BR_BROADBANDMODEL = "pt-BR_BroadbandModel";
/** pt-BR_NarrowbandModel. */
Expand All @@ -146,6 +158,8 @@ public interface Model {
String ZH_CN_BROADBANDMODEL = "zh-CN_BroadbandModel";
/** zh-CN_NarrowbandModel. */
String ZH_CN_NARROWBANDMODEL = "zh-CN_NarrowbandModel";
/** zh-CN_Telephony. */
String ZH_CN_TELEPHONY = "zh-CN_Telephony";
}

/**
Expand Down Expand Up @@ -752,11 +766,9 @@ public String contentType() {
* Gets the model.
*
* <p>The identifier of the model that is to be used for the recognition request. (**Note:** The
* model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See
* [Previous-generation languages and
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and
* [Next-generation languages and
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
* model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See [Using a
* model for speech
* recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use).
*
* @return the model
*/
Expand Down Expand Up @@ -1020,7 +1032,9 @@ public Boolean timestamps() {
*
* <p>If `true`, the service filters profanity from all output except for keyword results by
* replacing inappropriate words with a series of asterisks. Set the parameter to `false` to
* return results with no censoring. Applies to US English and Japanese transcription only. See
* return results with no censoring.
*
* <p>**Note:** The parameter can be used with US English and Japanese transcription only. See
* [Profanity
* filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#profanity-filtering).
*
Expand All @@ -1038,7 +1052,7 @@ public Boolean profanityFilter() {
* final transcript of a recognition request. For US English, the service also converts certain
* keyword strings to punctuation symbols. By default, the service performs no smart formatting.
*
* <p>**Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Spanish
* <p>**Note:** The parameter can be used with US English, Japanese, and Spanish (all dialects)
* transcription only.
*
* <p>See [Smart
Expand All @@ -1056,16 +1070,13 @@ public Boolean smartFormatting() {
* <p>If `true`, the response includes labels that identify which words were spoken by which
* participants in a multi-person exchange. By default, the service returns no speaker labels.
* Setting `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless
* of whether you specify `false` for the parameter.
*
* <p>**Beta:** The parameter is beta functionality. * For previous-generation models, the
* parameter can be used for Australian English, US English, German, Japanese, Korean, and Spanish
* (both broadband and narrowband models) and UK English (narrowband model) transcription only. *
* For next-generation models, the parameter can be used for English (Australian, Indian, UK, and
* US), German, Japanese, Korean, and Spanish transcription only.
* of whether you specify `false` for the parameter. * _For previous-generation models,_ the
* parameter can be used with Australian English, US English, German, Japanese, Korean, and
* Spanish (both broadband and narrowband models) and UK English (narrowband model) transcription
* only. * _For next-generation models,_ the parameter can be used with Czech, English
* (Australian, Indian, UK, and US), German, Japanese, Korean, and Spanish transcription only.
*
* <p>Restrictions and limitations apply to the use of speaker labels for both types of models.
* See [Speaker
* <p>See [Speaker
* labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels).
*
* @return the speakerLabels
Expand Down Expand Up @@ -1096,8 +1107,6 @@ public String customizationId() {
* that are recognized by the specified grammar; it does not recognize other custom words from the
* model's words resource.
*
* <p>**Beta:** The parameter is beta functionality.
*
* <p>See [Using a grammar for speech
* recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse).
*
Expand All @@ -1120,8 +1129,8 @@ public String grammarName() {
* disables keyword spotting (ignores the `keywords` and `keywords_threshold` parameters) and
* returns only a single final transcript (forces the `max_alternatives` parameter to be `1`).
*
* <p>**Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Korean
* transcription only.
* <p>**Note:** The parameter can be used with US English, Japanese, and Korean transcription
* only.
*
* <p>See [Numeric
* redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction).
Expand Down Expand Up @@ -1222,8 +1231,11 @@ public Double endOfPhraseSilenceTime() {
* semantic features of the input, for example, at the conclusion of meaningful phrases such as
* sentences. The service bases its understanding of semantic features on the base language model
* that you use with a request. Custom language models and grammars can also influence how and
* where the service splits a transcript. By default, the service splits transcripts based solely
* on the pause interval.
* where the service splits a transcript.
*
* <p>By default, the service splits transcripts based solely on the pause interval. If the
* parameters are used together on the same request, `end_of_phrase_silence_time` has precedence
* over `split_transcript_at_phrase_end`.
*
* <p>See [Split transcript at phrase
* end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#split-transcript).
Expand All @@ -1246,8 +1258,13 @@ public Boolean splitTranscriptAtPhraseEnd() {
* * 0.5 (the default) provides a reasonable compromise for the level of sensitivity. * 1.0
* suppresses no audio (speech detection sensitivity is disabled).
*
* <p>The values increase on a monotonic curve. See [Speech detector
* sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity).
* <p>The values increase on a monotonic curve.
*
* <p>The parameter is supported with all next-generation models and with most previous-generation
* models. See [Speech detector
* sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity)
* and [Language model
* support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
*
* @return the speechDetectorSensitivity
*/
Expand All @@ -1266,8 +1283,13 @@ public Float speechDetectorSensitivity() {
* (background audio suppression is disabled). * 0.5 provides a reasonable level of audio
* suppression for general usage. * 1.0 suppresses all audio (no audio is transcribed).
*
* <p>The values increase on a monotonic curve. See [Background audio
* suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression).
* <p>The values increase on a monotonic curve.
*
* <p>The parameter is supported with all next-generation models and with most previous-generation
* models. See [Background audio
* suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression)
* and [Language model
* support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
*
* @return the backgroundAudioSuppression
*/
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 @@ -24,11 +24,13 @@ public class CreateLanguageModelOptions extends GenericModel {
* <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).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
*/
public interface BaseModelName {
/** ar-MS_Telephony. */
String AR_MS_TELEPHONY = "ar-MS_Telephony";
/** cs-CZ_Telephony. */
String CS_CZ_TELEPHONY = "cs-CZ_Telephony";
/** de-DE_BroadbandModel. */
String DE_DE_BROADBANDMODEL = "de-DE_BroadbandModel";
/** de-DE_NarrowbandModel. */
Expand All @@ -37,12 +39,16 @@ public interface BaseModelName {
String DE_DE_TELEPHONY = "de-DE_Telephony";
/** en-AU_BroadbandModel. */
String EN_AU_BROADBANDMODEL = "en-AU_BroadbandModel";
/** en-AU_Multimedia. */
String EN_AU_MULTIMEDIA = "en-AU_Multimedia";
/** 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_Multimedia. */
String EN_GB_MULTIMEDIA = "en-GB_Multimedia";
/** en-GB_NarrowbandModel. */
String EN_GB_NARROWBANDMODEL = "en-GB_NarrowbandModel";
/** en-GB_Telephony. */
Expand All @@ -59,6 +65,8 @@ public interface BaseModelName {
String EN_US_SHORTFORM_NARROWBANDMODEL = "en-US_ShortForm_NarrowbandModel";
/** en-US_Telephony. */
String EN_US_TELEPHONY = "en-US_Telephony";
/** en-WW_Medical_Telephony. */
String EN_WW_MEDICAL_TELEPHONY = "en-WW_Medical_Telephony";
/** es-AR_BroadbandModel. */
String ES_AR_BROADBANDMODEL = "es-AR_BroadbandModel";
/** es-AR_NarrowbandModel. */
Expand All @@ -75,8 +83,12 @@ public interface BaseModelName {
String ES_ES_BROADBANDMODEL = "es-ES_BroadbandModel";
/** es-ES_NarrowbandModel. */
String ES_ES_NARROWBANDMODEL = "es-ES_NarrowbandModel";
/** es-ES_Multimedia. */
String ES_ES_MULTIMEDIA = "es-ES_Multimedia";
/** es-ES_Telephony. */
String ES_ES_TELEPHONY = "es-ES_Telephony";
/** es-LA_Telephony. */
String ES_LA_TELEPHONY = "es-LA_Telephony";
/** es-MX_BroadbandModel. */
String ES_MX_BROADBANDMODEL = "es-MX_BroadbandModel";
/** es-MX_NarrowbandModel. */
Expand Down Expand Up @@ -127,12 +139,16 @@ public interface BaseModelName {
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
/** nl-NL_NarrowbandModel. */
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel";
/** nl-NL_Telephony. */
String NL_NL_TELEPHONY = "nl-NL_Telephony";
/** pt-BR_BroadbandModel. */
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";
/** zh-CN_Telephony. */
String ZH_CN_TELEPHONY = "zh-CN_Telephony";
}

protected String name;
Expand Down Expand Up @@ -264,7 +280,7 @@ public String name() {
* <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).
* customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
*
* @return the baseModelName
*/
Expand All @@ -275,20 +291,19 @@ public String baseModelName() {
/**
* Gets the dialect.
*
* <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 the US English language models. All dialect values are case-insensitive.
* <p>The dialect of the specified language that is to be used with the custom language model.
* _For all languages, it is always safe to omit this field._ The service automatically uses the
* language identifier from the name of the base model. For example, the service automatically
* uses `en-US` for all US English 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>If you specify the `dialect` for a new custom model, follow these guidelines. _For
* non-Spanish previous-generation models and for next-generation models,_ you must specify a
* value that matches the five-character language identifier from the name of the base model. _For
* Spanish previous-generation models,_ you must specify one of the following values: * `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>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`).
* <p>All values that you pass for the `dialect` field are case-insensitive.
*
* @return the dialect
*/
Expand Down

0 comments on commit 62e4f8e

Please sign in to comment.