diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java index 303a09d22f..1b02ce6aa2 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java +++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/SpeechToText.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2016, 2022. + * (C) Copyright IBM Corp. 2023. * * 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 @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508 + * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647 */ package com.ibm.watson.speech_to_text.v1; @@ -72,7 +72,6 @@ import com.ibm.watson.speech_to_text.v1.model.RecognitionJob; import com.ibm.watson.speech_to_text.v1.model.RecognitionJobs; import com.ibm.watson.speech_to_text.v1.model.RecognizeOptions; -import com.ibm.watson.speech_to_text.v1.model.RecognizeWithWebsocketsOptions; import com.ibm.watson.speech_to_text.v1.model.RegisterCallbackOptions; import com.ibm.watson.speech_to_text.v1.model.RegisterStatus; import com.ibm.watson.speech_to_text.v1.model.ResetAcousticModelOptions; @@ -88,16 +87,10 @@ import com.ibm.watson.speech_to_text.v1.model.UpgradeLanguageModelOptions; import com.ibm.watson.speech_to_text.v1.model.Word; import com.ibm.watson.speech_to_text.v1.model.Words; -import com.ibm.watson.speech_to_text.v1.websocket.RecognizeCallback; -import com.ibm.watson.speech_to_text.v1.websocket.SpeechToTextWebSocketListener; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import okhttp3.HttpUrl; import okhttp3.MultipartBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.WebSocket; /** * The IBM Watson™ Speech to Text service provides APIs that use IBM's speech-recognition @@ -112,11 +105,10 @@ * sampling rates of 16 kHz. Narrowband and telephony models have minimum sampling rates of 8 kHz. * The next-generation models offer high throughput and greater transcription accuracy. * - *
Effective 15 March 2022, previous-generation models for all languages other than Arabic and - * Japanese are deprecated. The deprecated models remain available until 15 September 2022, when - * they will be removed from the service and the documentation. You must migrate to the equivalent - * next-generation model by the end of service date. For more information, see [Migrating to - * next-generation + *
Effective **31 July 2023**, all previous-generation models will be removed from the service
+ * and the documentation. Most previous-generation models were deprecated on 15 March 2022. You must
+ * migrate to the equivalent next-generation model by 31 July 2023. For more information, see
+ * [Migrating to next-generation
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).{:
* deprecated}
*
@@ -138,8 +130,10 @@
*/
public class SpeechToText extends BaseService {
+ /** Default service name used when configuring the `SpeechToText` client. */
public static final String DEFAULT_SERVICE_NAME = "speech_to_text";
+ /** Default service endpoint URL. */
public static final String DEFAULT_SERVICE_URL =
"https://api.us-south.speech-to-text.watson.cloud.ibm.com";
@@ -336,13 +330,11 @@ public ServiceCall Next-generation models do not support all of the speech recognition parameters that are
* available for use with previous-generation models. Next-generation models do not support the
* following parameters: * `acoustic_customization_id` * `keywords` and `keywords_threshold` *
- * `max_alternatives` * `processing_metrics` and `processing_metrics_interval` *
- * `word_alternatives_threshold`
+ * `processing_metrics` and `processing_metrics_interval` * `word_alternatives_threshold`
*
- * **Important:** Effective 15 March 2022, previous-generation models for all languages other
- * than Arabic and Japanese are deprecated. The deprecated models remain available until 15
- * September 2022, when they will be removed from the service and the documentation. You must
- * migrate to the equivalent next-generation model by the end of service date. For more
+ * **Important:** Effective **31 July 2023**, all previous-generation models will be removed
+ * from the service and the documentation. Most previous-generation models were deprecated on 15
+ * March 2022. You must migrate to the equivalent next-generation model by 31 July 2023. For more
* information, see [Migrating to next-generation
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
*
@@ -477,58 +469,6 @@ public ServiceCall The service imposes a data size limit of 100 MB per utterance (per recognition request). You
- * can send multiple utterances over a single WebSocket connection. The service automatically
- * detects the endianness of the incoming audio and, for audio that includes multiple channels,
- * downmixes the audio to one-channel mono during transcoding. (For the audio/l16 format, you can
- * specify the endianness.)
- *
- * @param recognizeOptions the recognize options
- * @param callback the {@link RecognizeCallback} instance where results will be sent
- * @return the {@link WebSocket}
- */
- public WebSocket recognizeUsingWebSocket(
- RecognizeWithWebsocketsOptions recognizeOptions, RecognizeCallback callback) {
- com.ibm.cloud.sdk.core.util.Validator.notNull(
- recognizeOptions, "recognizeOptions cannot be null");
- com.ibm.cloud.sdk.core.util.Validator.notNull(recognizeOptions.audio(), "audio cannot be null");
- com.ibm.cloud.sdk.core.util.Validator.notNull(callback, "callback cannot be null");
-
- HttpUrl.Builder urlBuilder = HttpUrl.parse(getServiceUrl() + "/v1/recognize").newBuilder();
-
- if (recognizeOptions.model() != null) {
- urlBuilder.addQueryParameter("model", recognizeOptions.model());
- }
- if (recognizeOptions.languageCustomizationId() != null) {
- urlBuilder.addQueryParameter(
- "language_customization_id", recognizeOptions.languageCustomizationId());
- }
- if (recognizeOptions.acousticCustomizationId() != null) {
- urlBuilder.addQueryParameter(
- "acoustic_customization_id", recognizeOptions.acousticCustomizationId());
- }
- if (recognizeOptions.baseModelVersion() != null) {
- urlBuilder.addQueryParameter("base_model_version", recognizeOptions.baseModelVersion());
- }
-
- String url = urlBuilder.toString().replace("https://", "wss://");
- Request.Builder builder = new Request.Builder().url(url);
-
- setAuthentication(builder);
- setDefaultHeaders(builder);
-
- OkHttpClient client = configureHttpClient();
- return client.newWebSocket(
- builder.build(), new SpeechToTextWebSocketListener(recognizeOptions, callback));
- }
-
/**
* Register a callback.
*
@@ -713,13 +653,11 @@ public ServiceCall Next-generation models do not support all of the speech recognition parameters that are
* available for use with previous-generation models. Next-generation models do not support the
* following parameters: * `acoustic_customization_id` * `keywords` and `keywords_threshold` *
- * `max_alternatives` * `processing_metrics` and `processing_metrics_interval` *
- * `word_alternatives_threshold`
+ * `processing_metrics` and `processing_metrics_interval` * `word_alternatives_threshold`
*
- * **Important:** Effective 15 March 2022, previous-generation models for all languages other
- * than Arabic and Japanese are deprecated. The deprecated models remain available until 15
- * September 2022, when they will be removed from the service and the documentation. You must
- * migrate to the equivalent next-generation model by the end of service date. For more
+ * **Important:** Effective **31 July 2023**, all previous-generation models will be removed
+ * from the service and the documentation. Most previous-generation models were deprecated on 15
+ * March 2022. You must migrate to the equivalent next-generation model by 31 July 2023. For more
* information, see [Migrating to next-generation
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
*
@@ -988,10 +926,9 @@ public ServiceCall **Important:** Effective 15 March 2022, previous-generation models for all languages other
- * than Arabic and Japanese are deprecated. The deprecated models remain available until 15
- * September 2022, when they will be removed from the service and the documentation. You must
- * migrate to the equivalent next-generation model by the end of service date. For more
+ * **Important:** Effective **31 July 2023**, all previous-generation models will be removed
+ * from the service and the documentation. Most previous-generation models were deprecated on 15
+ * March 2022. You must migrate to the equivalent next-generation model by 31 July 2023. For more
* information, see [Migrating to next-generation
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
*
@@ -1181,10 +1118,13 @@ public ServiceCall You can monitor the status of the training by using the [Get a custom language
* model](#getlanguagemodel) method to poll the model's status. Use a loop to check the status
- * every 10 seconds. The method returns a `LanguageModel` object that includes `status` and
- * `progress` fields. A status of `available` means that the custom model is trained and ready to
- * use. The service cannot accept subsequent training requests or requests to add new resources
- * until the existing request completes.
+ * every 10 seconds. If you added custom words directly to a custom model that is based on a
+ * next-generation model, allow for some minutes of extra training time for the model.
+ *
+ * The method returns a `LanguageModel` object that includes `status` and `progress` fields. A
+ * status of `available` means that the custom model is trained and ready to use. The service
+ * cannot accept subsequent training requests or requests to add new resources until the existing
+ * request completes.
*
* **See also:** * [Train the custom language
* model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#trainModel-language)
@@ -2028,10 +1968,9 @@ public ServiceCall **Note:** Acoustic model customization is supported only for use with previous-generation
* models. It is not supported for next-generation models.
*
- * **Important:** Effective 15 March 2022, previous-generation models for all languages other
- * than Arabic and Japanese are deprecated. The deprecated models remain available until 15
- * September 2022, when they will be removed from the service and the documentation. You must
- * migrate to the equivalent next-generation model by the end of service date. For more
+ * **Important:** Effective **31 July 2023**, all previous-generation models will be removed
+ * from the service and the documentation. Most previous-generation models were deprecated on 15
+ * March 2022. You must migrate to the equivalent next-generation model by 31 July 2023. For more
* information, see [Migrating to next-generation
* models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
*
@@ -2249,15 +2188,20 @@ public ServiceCall Training can fail to start for the following reasons: * The service is currently handling
* another request for the custom model, such as another training request or a request to add
- * audio resources to the model. * The custom model contains less than 10 minutes or more than 200
- * hours of audio data. * You passed a custom language model with the `custom_language_model_id`
- * query parameter that is not in the available state. A custom language model must be fully
- * trained and available to be used to train a custom acoustic model. * You passed an incompatible
- * custom language model with the `custom_language_model_id` query parameter. Both custom models
- * must be based on the same version of the same base model. * The custom model contains one or
- * more invalid audio resources. You can correct the invalid audio resources or set the `strict`
- * parameter to `false` to exclude the invalid resources from the training. The model must contain
- * at least one valid resource for training to succeed.
+ * audio resources to the model. * The custom model contains less than 10 minutes of audio that
+ * includes speech, not silence. * The custom model contains more than 50 hours of audio (for IBM
+ * Cloud) or more that 200 hours of audio (for IBM Cloud Pak for Data). **Note:** For IBM Cloud,
+ * the maximum hours of audio for a custom acoustic model was reduced from 200 to 50 hours in
+ * August and September 2022. For more information, see [Maximum hours of
+ * audio](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audioResources#audioMaximum).
+ * * You passed a custom language model with the `custom_language_model_id` query parameter that
+ * is not in the available state. A custom language model must be fully trained and available to
+ * be used to train a custom acoustic model. * You passed an incompatible custom language model
+ * with the `custom_language_model_id` query parameter. Both custom models must be based on the
+ * same version of the same base model. * The custom model contains one or more invalid audio
+ * resources. You can correct the invalid audio resources or set the `strict` parameter to `false`
+ * to exclude the invalid resources from the training. The model must contain at least one valid
+ * resource for training to succeed.
*
* @param trainAcousticModelOptions the {@link TrainAcousticModelOptions} containing the options
* for the call
@@ -2461,11 +2405,15 @@ public ServiceCall You can use this method to add any number of audio resources to a custom model by calling
* the method once for each audio or archive file. You can add multiple different audio resources
- * at the same time. You must add a minimum of 10 minutes and a maximum of 200 hours of audio that
- * includes speech, not just silence, to a custom acoustic model before you can train it. No audio
- * resource, audio- or archive-type, can be larger than 100 MB. To add an audio resource that has
- * the same name as an existing audio resource, set the `allow_overwrite` parameter to `true`;
- * otherwise, the request fails.
+ * at the same time. You must add a minimum of 10 minutes of audio that includes speech, not just
+ * silence, to a custom acoustic model before you can train it. No audio resource, audio- or
+ * archive-type, can be larger than 100 MB. To add an audio resource that has the same name as an
+ * existing audio resource, set the `allow_overwrite` parameter to `true`; otherwise, the request
+ * fails. A custom model can contain no more than 50 hours of audio (for IBM Cloud) or 200 hours
+ * of audio (for IBM Cloud Pak for Data). **Note:** For IBM Cloud, the maximum hours of audio for
+ * a custom acoustic model was reduced from 200 to 50 hours in August and September 2022. For more
+ * information, see [Maximum hours of
+ * audio](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audioResources#audioMaximum).
*
* The method is asynchronous. It can take several seconds or minutes to complete depending on
* the duration of the audio and, in the case of an archive file, the total number of audio files
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java
index 7c1fb1f2d9..74f50bd85a 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModel.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -61,6 +61,8 @@ public interface Status {
protected Long progress;
protected String warnings;
+ protected AcousticModel() {}
+
/**
* Gets the customizationId.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java
index a270d1220d..960b3f1bf9 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/AcousticModels.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -20,6 +20,8 @@ public class AcousticModels extends GenericModel {
protected List 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).
*/
public interface BaseModelName {
- /** ar-AR_BroadbandModel. */
- String AR_AR_BROADBANDMODEL = "ar-AR_BroadbandModel";
/** ar-MS_BroadbandModel. */
String AR_MS_BROADBANDMODEL = "ar-MS_BroadbandModel";
/** de-DE_BroadbandModel. */
@@ -117,6 +114,11 @@ public static class Builder {
private String baseModelName;
private String description;
+ /**
+ * Instantiates a new Builder from an existing CreateAcousticModelOptions instance.
+ *
+ * @param createAcousticModelOptions the instance to initialize the Builder with
+ */
private Builder(CreateAcousticModelOptions createAcousticModelOptions) {
this.name = createAcousticModelOptions.name;
this.baseModelName = createAcousticModelOptions.baseModelName;
@@ -203,10 +205,13 @@ public Builder newBuilder() {
/**
* Gets the name.
*
- * A user-defined name for the new custom acoustic model. Use a name that is unique among all
- * custom acoustic models that you own. Use a localized name that matches the language of the
- * custom model. Use a name that describes the acoustic environment of the custom model, such as
- * `Mobile custom model` or `Noisy car custom model`.
+ * A user-defined name for the new custom acoustic model. Use a localized name that matches the
+ * language of the custom model. Use a name that describes the acoustic environment of the custom
+ * model, such as `Mobile custom model` or `Noisy car custom model`. Use a name that is unique
+ * among all custom acoustic models that you own.
+ *
+ * Include a maximum of 256 characters in the name. Do not use backslashes, slashes, colons,
+ * equal signs, ampersands, or question marks in the name.
*
* @return the name
*/
@@ -218,8 +223,7 @@ public String name() {
* Gets the baseModelName.
*
* The name of the base language model that is to be customized by the new custom acoustic
- * model. The new custom model can be used only with the base model that it customizes. (**Note:**
- * The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.)
+ * model. The new custom model can be used only with the base model that it customizes.
*
* To determine whether a base model supports acoustic model customization, refer to [Language
* support for
@@ -234,8 +238,9 @@ public String baseModelName() {
/**
* Gets the description.
*
- * A description of the new custom acoustic model. Use a localized description that matches the
- * language of the custom model.
+ * A recommended description of the new custom acoustic model. Use a localized description that
+ * matches the language of the custom model. Include a maximum of 128 characters in the
+ * description.
*
* @return the description
*/
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java
index b96615bf24..bf01414ff3 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateJobOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -25,21 +25,18 @@ public class CreateJobOptions extends GenericModel {
/**
* The model to use for speech recognition. If you omit the `model` parameter, the service uses
- * the US English `en-US_BroadbandModel` by default. (The model `ar-AR_BroadbandModel` is
- * deprecated; use `ar-MS_BroadbandModel` instead.)
+ * the US English `en-US_BroadbandModel` by default.
*
* _For IBM Cloud Pak for Data,_ if you do not install the `en-US_BroadbandModel`, you must
* either specify a model with the request or specify a new default model for your installation of
* the service.
*
* **See also:** * [Using a model for speech
- * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) * [The
- * default
+ * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) *
+ * [Using the default
* model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use#models-use-default).
*/
public interface Model {
- /** ar-AR_BroadbandModel. */
- String AR_AR_BROADBANDMODEL = "ar-AR_BroadbandModel";
/** ar-MS_BroadbandModel. */
String AR_MS_BROADBANDMODEL = "ar-MS_BroadbandModel";
/** ar-MS_Telephony. */
@@ -116,6 +113,8 @@ public interface Model {
String ES_PE_NARROWBANDMODEL = "es-PE_NarrowbandModel";
/** fr-CA_BroadbandModel. */
String FR_CA_BROADBANDMODEL = "fr-CA_BroadbandModel";
+ /** fr-CA_Multimedia. */
+ String FR_CA_MULTIMEDIA = "fr-CA_Multimedia";
/** fr-CA_NarrowbandModel. */
String FR_CA_NARROWBANDMODEL = "fr-CA_NarrowbandModel";
/** fr-CA_Telephony. */
@@ -144,6 +143,8 @@ public interface Model {
String JA_JP_MULTIMEDIA = "ja-JP_Multimedia";
/** ja-JP_NarrowbandModel. */
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
+ /** ja-JP_Telephony. */
+ String JA_JP_TELEPHONY = "ja-JP_Telephony";
/** ko-KR_BroadbandModel. */
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
/** ko-KR_Multimedia. */
@@ -156,6 +157,8 @@ public interface Model {
String NL_BE_TELEPHONY = "nl-BE_Telephony";
/** nl-NL_BroadbandModel. */
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
+ /** nl-NL_Multimedia. */
+ String NL_NL_MULTIMEDIA = "nl-NL_Multimedia";
/** nl-NL_NarrowbandModel. */
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel";
/** nl-NL_Telephony. */
@@ -168,6 +171,8 @@ public interface Model {
String PT_BR_NARROWBANDMODEL = "pt-BR_NarrowbandModel";
/** pt-BR_Telephony. */
String PT_BR_TELEPHONY = "pt-BR_Telephony";
+ /** sv-SE_Telephony. */
+ String SV_SE_TELEPHONY = "sv-SE_Telephony";
/** zh-CN_BroadbandModel. */
String ZH_CN_BROADBANDMODEL = "zh-CN_BroadbandModel";
/** zh-CN_NarrowbandModel. */
@@ -272,6 +277,11 @@ public static class Builder {
private Boolean lowLatency;
private Float characterInsertionBias;
+ /**
+ * Instantiates a new Builder from an existing CreateJobOptions instance.
+ *
+ * @param createJobOptions the instance to initialize the Builder with
+ */
private Builder(CreateJobOptions createJobOptions) {
this.audio = createJobOptions.audio;
this.contentType = createJobOptions.contentType;
@@ -782,16 +792,15 @@ public String contentType() {
* Gets the model.
*
* The model to use for speech recognition. If you omit the `model` parameter, the service uses
- * the US English `en-US_BroadbandModel` by default. (The model `ar-AR_BroadbandModel` is
- * deprecated; use `ar-MS_BroadbandModel` instead.)
+ * the US English `en-US_BroadbandModel` by default.
*
* _For IBM Cloud Pak for Data,_ if you do not install the `en-US_BroadbandModel`, you must
* either specify a model with the request or specify a new default model for your installation of
* the service.
*
* **See also:** * [Using a model for speech
- * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) * [The
- * default
+ * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) *
+ * [Using the default
* model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use#models-use-default).
*
* @return the model
@@ -928,13 +937,15 @@ public String baseModelVersion() {
* custom language model compared to those from the base model for the current request.
*
* Specify a value between 0.0 and 1.0. Unless a different customization weight was specified
- * for the custom model when it was trained, the default value is 0.3. A customization weight that
- * you specify overrides a weight that was specified when the custom model was trained.
+ * for the custom model when the model was trained, the default value is: * 0.3 for
+ * previous-generation models * 0.2 for most next-generation models * 0.1 for next-generation
+ * English and Japanese models
*
- * The default value yields the best performance in general. Assign a higher value if your
- * audio makes frequent use of OOV words from the custom model. Use caution when setting the
- * weight: a higher value can improve the accuracy of phrases from the custom model's domain, but
- * it can negatively affect performance on non-domain phrases.
+ * A customization weight that you specify overrides a weight that was specified when the
+ * custom model was trained. The default value yields the best performance in general. Assign a
+ * higher value if your audio makes frequent use of OOV words from the custom model. Use caution
+ * when setting the weight: a higher value can improve the accuracy of phrases from the custom
+ * model's domain, but it can negatively affect performance on non-domain phrases.
*
* See [Using customization
* weight](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageUse#weight).
@@ -1213,10 +1224,10 @@ public Boolean audioMetrics() {
/**
* Gets the endOfPhraseSilenceTime.
*
- * If `true`, specifies the duration of the pause interval at which the service splits a
- * transcript into multiple final results. If the service detects pauses or extended silence
- * before it reaches the end of the audio stream, its response can include multiple final results.
- * Silence indicates a point at which the speaker pauses between spoken words or phrases.
+ * Specifies the duration of the pause interval at which the service splits a transcript into
+ * multiple final results. If the service detects pauses or extended silence before it reaches the
+ * end of the audio stream, its response can include multiple final results. Silence indicates a
+ * point at which the speaker pauses between spoken words or phrases.
*
* Specify a value for the pause interval in the range of 0.0 to 120.0. * A value greater than
* 0 specifies the interval that the service is to use for speech recognition. * A value of 0
@@ -1335,16 +1346,13 @@ public Boolean lowLatency() {
/**
* Gets the characterInsertionBias.
*
- * For next-generation `Multimedia` and `Telephony` models, an indication of whether the
- * service is biased to recognize shorter or longer strings of characters when developing
- * transcription hypotheses. By default, the service is optimized for each individual model to
- * balance its recognition of strings of different lengths. The model-specific bias is equivalent
- * to 0.0.
+ * For next-generation models, an indication of whether the service is biased to recognize
+ * shorter or longer strings of characters when developing transcription hypotheses. By default,
+ * the service is optimized to produce the best balance of strings of different lengths.
*
- * The value that you specify represents a change from a model's default bias. The allowable
- * range of values is -1.0 to 1.0. * Negative values bias the service to favor hypotheses with
- * shorter strings of characters. * Positive values bias the service to favor hypotheses with
- * longer strings of characters.
+ * The default bias is 0.0. The allowable range of values is -1.0 to 1.0. * Negative values
+ * bias the service to favor hypotheses with shorter strings of characters. * Positive values bias
+ * the service to favor hypotheses with longer strings of characters.
*
* As the value approaches -1.0 or 1.0, the impact of the parameter becomes more pronounced. To
* determine the most effective value for your scenario, start by setting the value of the
@@ -1352,7 +1360,7 @@ public Boolean lowLatency() {
* impacts the transcription results. Then experiment with different values as necessary,
* adjusting the value by small increments.
*
- * The parameter is not available for previous-generation `Broadband` and `Narrowband` models.
+ * The parameter is not available for previous-generation models.
*
* See [Character insertion
* bias](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#insertion-bias).
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java
index 412763ed7a..b05f9b7382 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CreateLanguageModelOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -101,6 +101,8 @@ public interface BaseModelName {
String ES_PE_NARROWBANDMODEL = "es-PE_NarrowbandModel";
/** fr-CA_BroadbandModel. */
String FR_CA_BROADBANDMODEL = "fr-CA_BroadbandModel";
+ /** fr-CA_Multimedia. */
+ String FR_CA_MULTIMEDIA = "fr-CA_Multimedia";
/** fr-CA_NarrowbandModel. */
String FR_CA_NARROWBANDMODEL = "fr-CA_NarrowbandModel";
/** fr-CA_Telephony. */
@@ -129,6 +131,8 @@ public interface BaseModelName {
String JA_JP_MULTIMEDIA = "ja-JP_Multimedia";
/** ja-JP_NarrowbandModel. */
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
+ /** ja-JP_Telephony. */
+ String JA_JP_TELEPHONY = "ja-JP_Telephony";
/** ko-KR_BroadbandModel. */
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
/** ko-KR_Multimedia. */
@@ -141,6 +145,8 @@ public interface BaseModelName {
String NL_BE_TELEPHONY = "nl-BE_Telephony";
/** nl-NL_BroadbandModel. */
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
+ /** nl-NL_Multimedia. */
+ String NL_NL_MULTIMEDIA = "nl-NL_Multimedia";
/** nl-NL_NarrowbandModel. */
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel";
/** nl-NL_Telephony. */
@@ -153,6 +159,8 @@ public interface BaseModelName {
String PT_BR_NARROWBANDMODEL = "pt-BR_NarrowbandModel";
/** pt-BR_Telephony. */
String PT_BR_TELEPHONY = "pt-BR_Telephony";
+ /** sv-SE_Telephony. */
+ String SV_SE_TELEPHONY = "sv-SE_Telephony";
/** zh-CN_Telephony. */
String ZH_CN_TELEPHONY = "zh-CN_Telephony";
}
@@ -169,6 +177,11 @@ public static class Builder {
private String dialect;
private String description;
+ /**
+ * Instantiates a new Builder from an existing CreateLanguageModelOptions instance.
+ *
+ * @param createLanguageModelOptions the instance to initialize the Builder with
+ */
private Builder(CreateLanguageModelOptions createLanguageModelOptions) {
this.name = createLanguageModelOptions.name;
this.baseModelName = createLanguageModelOptions.baseModelName;
@@ -268,10 +281,13 @@ public Builder newBuilder() {
/**
* Gets the name.
*
- * A user-defined name for the new custom language model. Use a name that is unique among all
- * custom language models that you own. Use a localized name that matches the language of the
- * custom model. Use a name that describes the domain of the custom model, such as `Medical custom
- * model` or `Legal custom model`.
+ * A user-defined name for the new custom language model. Use a localized name that matches the
+ * language of the custom model. Use a name that describes the domain of the custom model, such as
+ * `Medical custom model` or `Legal custom model`. Use a name that is unique among all custom
+ * language models that you own.
+ *
+ * Include a maximum of 256 characters in the name. Do not use backslashes, slashes, colons,
+ * equal signs, ampersands, or question marks in the name.
*
* @return the name
*/
@@ -322,8 +338,9 @@ public String dialect() {
/**
* Gets the description.
*
- * A description of the new custom language model. Use a localized description that matches the
- * language of the custom model.
+ * A recommended description of the new custom language model. Use a localized description that
+ * matches the language of the custom model. Include a maximum of 128 characters in the
+ * description.
*
* @return the description
*/
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java
index ca99f164f8..215486a755 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/CustomWord.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -34,6 +34,11 @@ public static class Builder {
private List 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.).
+ * models](#listmodels) method.
*
* @return the modelId
*/
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java
index 796779a412..a3a7e4f382 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/GetWordOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -25,6 +25,11 @@ public static class Builder {
private String customizationId;
private String wordName;
+ /**
+ * Instantiates a new Builder from an existing GetWordOptions instance.
+ *
+ * @param getWordOptions the instance to initialize the Builder with
+ */
private Builder(GetWordOptions getWordOptions) {
this.customizationId = getWordOptions.customizationId;
this.wordName = getWordOptions.wordName;
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java
index d3b4c2c18d..f0c6075624 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammar.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -42,6 +42,8 @@ public interface Status {
protected String status;
protected String error;
+ protected Grammar() {}
+
/**
* Gets the name.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java
index 70add9efbb..73a45999ac 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/Grammars.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -20,6 +20,8 @@ public class Grammars extends GenericModel {
protected List 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-custom-support).
*/
public interface Language {
- /** ar-AR. */
- String AR_AR = "ar-AR";
/** ar-MS. */
String AR_MS = "ar-MS";
/** cs-CZ. */
@@ -78,6 +76,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";
}
@@ -88,6 +88,11 @@ public interface Language {
public static class Builder {
private String language;
+ /**
+ * Instantiates a new Builder from an existing ListAcousticModelsOptions instance.
+ *
+ * @param listAcousticModelsOptions the instance to initialize the Builder with
+ */
private Builder(ListAcousticModelsOptions listAcousticModelsOptions) {
this.language = listAcousticModelsOptions.language;
}
@@ -138,7 +143,7 @@ public Builder newBuilder() {
* returned. Specify the five-character language identifier; for example, specify `en-US` to see
* all custom language or custom acoustic models that are based on US English models. Omit the
* parameter to see all custom language or custom acoustic models that are owned by the requesting
- * credentials. (**Note:** The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+ * credentials.
*
* 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-custom-support).
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java
index ced63dd38f..fa996e6af4 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListAudioOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -23,6 +23,11 @@ public class ListAudioOptions extends GenericModel {
public static class Builder {
private String customizationId;
+ /**
+ * Instantiates a new Builder from an existing ListAudioOptions instance.
+ *
+ * @param listAudioOptions the instance to initialize the Builder with
+ */
private Builder(ListAudioOptions listAudioOptions) {
this.customizationId = listAudioOptions.customizationId;
}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java
index 889e5ca5ed..9d8fab98b5 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListCorporaOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -23,6 +23,11 @@ public class ListCorporaOptions extends GenericModel {
public static class Builder {
private String customizationId;
+ /**
+ * Instantiates a new Builder from an existing ListCorporaOptions instance.
+ *
+ * @param listCorporaOptions the instance to initialize the Builder with
+ */
private Builder(ListCorporaOptions listCorporaOptions) {
this.customizationId = listCorporaOptions.customizationId;
}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java
index 4c9cefe7ff..5faeb3d015 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListGrammarsOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -23,6 +23,11 @@ public class ListGrammarsOptions extends GenericModel {
public static class Builder {
private String customizationId;
+ /**
+ * Instantiates a new Builder from an existing ListGrammarsOptions instance.
+ *
+ * @param listGrammarsOptions the instance to initialize the Builder with
+ */
private Builder(ListGrammarsOptions listGrammarsOptions) {
this.customizationId = listGrammarsOptions.customizationId;
}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java
index cd56d4cc77..4a0a0949ef 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListLanguageModelsOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -22,14 +22,12 @@ public class ListLanguageModelsOptions extends GenericModel {
* returned. Specify the five-character language identifier; for example, specify `en-US` to see
* all custom language or custom acoustic models that are based on US English models. Omit the
* parameter to see all custom language or custom acoustic models that are owned by the requesting
- * credentials. (**Note:** The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+ * credentials.
*
* 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-custom-support).
*/
public interface Language {
- /** ar-AR. */
- String AR_AR = "ar-AR";
/** ar-MS. */
String AR_MS = "ar-MS";
/** cs-CZ. */
@@ -78,6 +76,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";
}
@@ -88,6 +88,11 @@ public interface Language {
public static class Builder {
private String language;
+ /**
+ * Instantiates a new Builder from an existing ListLanguageModelsOptions instance.
+ *
+ * @param listLanguageModelsOptions the instance to initialize the Builder with
+ */
private Builder(ListLanguageModelsOptions listLanguageModelsOptions) {
this.language = listLanguageModelsOptions.language;
}
@@ -138,7 +143,7 @@ public Builder newBuilder() {
* returned. Specify the five-character language identifier; for example, specify `en-US` to see
* all custom language or custom acoustic models that are based on US English models. Omit the
* parameter to see all custom language or custom acoustic models that are owned by the requesting
- * credentials. (**Note:** The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+ * credentials.
*
* 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-custom-support).
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java
index 8c64e66bf5..a0f1c361cd 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListModelsOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -15,4 +15,8 @@
import com.ibm.cloud.sdk.core.service.model.GenericModel;
/** The listModels options. */
-public class ListModelsOptions extends GenericModel {}
+public class ListModelsOptions extends GenericModel {
+
+ /** Construct a new instance of ListModelsOptions. */
+ public ListModelsOptions() {}
+}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java
index 6e1bbdfc58..7b4c7ea0cd 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ListWordsOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -63,6 +63,11 @@ public static class Builder {
private String wordType;
private String sort;
+ /**
+ * Instantiates a new Builder from an existing ListWordsOptions instance.
+ *
+ * @param listWordsOptions the instance to initialize the Builder with
+ */
private Builder(ListWordsOptions listWordsOptions) {
this.customizationId = listWordsOptions.customizationId;
this.wordType = listWordsOptions.wordType;
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java
index 0247350879..841a8f6b8b 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessedAudio.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -28,6 +28,8 @@ public class ProcessedAudio extends GenericModel {
@SerializedName("speaker_labels")
protected Float speakerLabels;
+ protected ProcessedAudio() {}
+
/**
* Gets the received.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java
index 22d11ad904..412c6b3d59 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ProcessingMetrics.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2021.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -30,6 +30,8 @@ public class ProcessingMetrics extends GenericModel {
protected Boolean periodic;
+ protected ProcessingMetrics() {}
+
/**
* Gets the processedAudio.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java
index b835d45e82..145c3f1168 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RecognitionJob.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2016, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -52,6 +52,8 @@ public interface Status {
protected List _For IBM Cloud Pak for Data,_ if you do not install the `en-US_BroadbandModel`, you must
* either specify a model with the request or specify a new default model for your installation of
* the service.
*
* **See also:** * [Using a model for speech
- * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) * [The
- * default
+ * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) *
+ * [Using the default
* model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use#models-use-default).
*/
public interface Model {
- /** ar-AR_BroadbandModel. */
- String AR_AR_BROADBANDMODEL = "ar-AR_BroadbandModel";
/** ar-MS_BroadbandModel. */
String AR_MS_BROADBANDMODEL = "ar-MS_BroadbandModel";
/** ar-MS_Telephony. */
@@ -116,6 +113,8 @@ public interface Model {
String ES_PE_NARROWBANDMODEL = "es-PE_NarrowbandModel";
/** fr-CA_BroadbandModel. */
String FR_CA_BROADBANDMODEL = "fr-CA_BroadbandModel";
+ /** fr-CA_Multimedia. */
+ String FR_CA_MULTIMEDIA = "fr-CA_Multimedia";
/** fr-CA_NarrowbandModel. */
String FR_CA_NARROWBANDMODEL = "fr-CA_NarrowbandModel";
/** fr-CA_Telephony. */
@@ -144,6 +143,8 @@ public interface Model {
String JA_JP_MULTIMEDIA = "ja-JP_Multimedia";
/** ja-JP_NarrowbandModel. */
String JA_JP_NARROWBANDMODEL = "ja-JP_NarrowbandModel";
+ /** ja-JP_Telephony. */
+ String JA_JP_TELEPHONY = "ja-JP_Telephony";
/** ko-KR_BroadbandModel. */
String KO_KR_BROADBANDMODEL = "ko-KR_BroadbandModel";
/** ko-KR_Multimedia. */
@@ -156,6 +157,8 @@ public interface Model {
String NL_BE_TELEPHONY = "nl-BE_Telephony";
/** nl-NL_BroadbandModel. */
String NL_NL_BROADBANDMODEL = "nl-NL_BroadbandModel";
+ /** nl-NL_Multimedia. */
+ String NL_NL_MULTIMEDIA = "nl-NL_Multimedia";
/** nl-NL_NarrowbandModel. */
String NL_NL_NARROWBANDMODEL = "nl-NL_NarrowbandModel";
/** nl-NL_Telephony. */
@@ -168,6 +171,8 @@ public interface Model {
String PT_BR_NARROWBANDMODEL = "pt-BR_NarrowbandModel";
/** pt-BR_Telephony. */
String PT_BR_TELEPHONY = "pt-BR_Telephony";
+ /** sv-SE_Telephony. */
+ String SV_SE_TELEPHONY = "sv-SE_Telephony";
/** zh-CN_BroadbandModel. */
String ZH_CN_BROADBANDMODEL = "zh-CN_BroadbandModel";
/** zh-CN_NarrowbandModel. */
@@ -232,6 +237,11 @@ public static class Builder {
private Boolean lowLatency;
private Float characterInsertionBias;
+ /**
+ * Instantiates a new Builder from an existing RecognizeOptions instance.
+ *
+ * @param recognizeOptions the instance to initialize the Builder with
+ */
private Builder(RecognizeOptions recognizeOptions) {
this.audio = recognizeOptions.audio;
this.contentType = recognizeOptions.contentType;
@@ -664,16 +674,15 @@ public String contentType() {
* Gets the model.
*
* The model to use for speech recognition. If you omit the `model` parameter, the service uses
- * the US English `en-US_BroadbandModel` by default. (The model `ar-AR_BroadbandModel` is
- * deprecated; use `ar-MS_BroadbandModel` instead.)
+ * the US English `en-US_BroadbandModel` by default.
*
* _For IBM Cloud Pak for Data,_ if you do not install the `en-US_BroadbandModel`, you must
* either specify a model with the request or specify a new default model for your installation of
* the service.
*
* **See also:** * [Using a model for speech
- * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) * [The
- * default
+ * recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use) *
+ * [Using the default
* model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use#models-use-default).
*
* @return the model
@@ -740,13 +749,15 @@ public String baseModelVersion() {
* custom language model compared to those from the base model for the current request.
*
* Specify a value between 0.0 and 1.0. Unless a different customization weight was specified
- * for the custom model when it was trained, the default value is 0.3. A customization weight that
- * you specify overrides a weight that was specified when the custom model was trained.
+ * for the custom model when the model was trained, the default value is: * 0.3 for
+ * previous-generation models * 0.2 for most next-generation models * 0.1 for next-generation
+ * English and Japanese models
*
- * The default value yields the best performance in general. Assign a higher value if your
- * audio makes frequent use of OOV words from the custom model. Use caution when setting the
- * weight: a higher value can improve the accuracy of phrases from the custom model's domain, but
- * it can negatively affect performance on non-domain phrases.
+ * A customization weight that you specify overrides a weight that was specified when the
+ * custom model was trained. The default value yields the best performance in general. Assign a
+ * higher value if your audio makes frequent use of OOV words from the custom model. Use caution
+ * when setting the weight: a higher value can improve the accuracy of phrases from the custom
+ * model's domain, but it can negatively affect performance on non-domain phrases.
*
* See [Using customization
* weight](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageUse#weight).
@@ -983,10 +994,10 @@ public Boolean audioMetrics() {
/**
* Gets the endOfPhraseSilenceTime.
*
- * If `true`, specifies the duration of the pause interval at which the service splits a
- * transcript into multiple final results. If the service detects pauses or extended silence
- * before it reaches the end of the audio stream, its response can include multiple final results.
- * Silence indicates a point at which the speaker pauses between spoken words or phrases.
+ * Specifies the duration of the pause interval at which the service splits a transcript into
+ * multiple final results. If the service detects pauses or extended silence before it reaches the
+ * end of the audio stream, its response can include multiple final results. Silence indicates a
+ * point at which the speaker pauses between spoken words or phrases.
*
* Specify a value for the pause interval in the range of 0.0 to 120.0. * A value greater than
* 0 specifies the interval that the service is to use for speech recognition. * A value of 0
@@ -1105,16 +1116,13 @@ public Boolean lowLatency() {
/**
* Gets the characterInsertionBias.
*
- * For next-generation `Multimedia` and `Telephony` models, an indication of whether the
- * service is biased to recognize shorter or longer strings of characters when developing
- * transcription hypotheses. By default, the service is optimized for each individual model to
- * balance its recognition of strings of different lengths. The model-specific bias is equivalent
- * to 0.0.
+ * For next-generation models, an indication of whether the service is biased to recognize
+ * shorter or longer strings of characters when developing transcription hypotheses. By default,
+ * the service is optimized to produce the best balance of strings of different lengths.
*
- * The value that you specify represents a change from a model's default bias. The allowable
- * range of values is -1.0 to 1.0. * Negative values bias the service to favor hypotheses with
- * shorter strings of characters. * Positive values bias the service to favor hypotheses with
- * longer strings of characters.
+ * The default bias is 0.0. The allowable range of values is -1.0 to 1.0. * Negative values
+ * bias the service to favor hypotheses with shorter strings of characters. * Positive values bias
+ * the service to favor hypotheses with longer strings of characters.
*
* As the value approaches -1.0 or 1.0, the impact of the parameter becomes more pronounced. To
* determine the most effective value for your scenario, start by setting the value of the
@@ -1122,7 +1130,7 @@ public Boolean lowLatency() {
* impacts the transcription results. Then experiment with different values as necessary,
* adjusting the value by small increments.
*
- * The parameter is not available for previous-generation `Broadband` and `Narrowband` models.
+ * The parameter is not available for previous-generation models.
*
* See [Character insertion
* bias](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#insertion-bias).
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java
index 43f45a94a0..e7720c93d1 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterCallbackOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -25,6 +25,11 @@ public static class Builder {
private String callbackUrl;
private String userSecret;
+ /**
+ * Instantiates a new Builder from an existing RegisterCallbackOptions instance.
+ *
+ * @param registerCallbackOptions the instance to initialize the Builder with
+ */
private Builder(RegisterCallbackOptions registerCallbackOptions) {
this.callbackUrl = registerCallbackOptions.callbackUrl;
this.userSecret = registerCallbackOptions.userSecret;
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java
index 3760722214..f563b1b52c 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/RegisterStatus.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -31,6 +31,8 @@ public interface Status {
protected String status;
protected String url;
+ protected RegisterStatus() {}
+
/**
* Gets the status.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java
index 3d7f3a1880..5e0c5de808 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetAcousticModelOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -23,6 +23,11 @@ public class ResetAcousticModelOptions extends GenericModel {
public static class Builder {
private String customizationId;
+ /**
+ * Instantiates a new Builder from an existing ResetAcousticModelOptions instance.
+ *
+ * @param resetAcousticModelOptions the instance to initialize the Builder with
+ */
private Builder(ResetAcousticModelOptions resetAcousticModelOptions) {
this.customizationId = resetAcousticModelOptions.customizationId;
}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java
index 35f6b61d8c..4e4011f16c 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/ResetLanguageModelOptions.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -23,6 +23,11 @@ public class ResetLanguageModelOptions extends GenericModel {
public static class Builder {
private String customizationId;
+ /**
+ * Instantiates a new Builder from an existing ResetLanguageModelOptions instance.
+ *
+ * @param resetLanguageModelOptions the instance to initialize the Builder with
+ */
private Builder(ResetLanguageModelOptions resetLanguageModelOptions) {
this.customizationId = resetLanguageModelOptions.customizationId;
}
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java
index 67897fbf34..83c7601c0a 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeakerLabelsResult.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2018, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -26,6 +26,8 @@ public class SpeakerLabelsResult extends GenericModel {
@SerializedName("final")
protected Boolean xFinal;
+ protected SpeakerLabelsResult() {}
+
/**
* Gets the from.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java
index bf69e5c5b9..c0f2aca555 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModel.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2016, 2022.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -28,6 +28,8 @@ public class SpeechModel extends GenericModel {
protected String description;
+ protected SpeechModel() {}
+
/**
* Gets the name.
*
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java
index 73fa92b454..cd85bebdb2 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/SpeechModels.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -20,6 +20,8 @@ public class SpeechModels extends GenericModel {
protected List Specifies a customization weight for the custom language model. The customization weight
* tells the service how much weight to give to words from the custom language model compared to
- * those from the base model for speech recognition. Specify a value between 0.0 and 1.0; the
- * default is 0.3.
+ * those from the base model for speech recognition. Specify a value between 0.0 and 1.0. The
+ * default value is: * 0.3 for previous-generation models * 0.2 for most next-generation models *
+ * 0.1 for next-generation English and Japanese models
*
* The default value yields the best performance in general. Assign a higher value if your
* audio makes frequent use of OOV words from the custom model. Use caution when setting the
diff --git a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java
index 9209f2dd47..6f42e32d89 100644
--- a/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/TrainingResponse.java
@@ -1,5 +1,5 @@
/*
- * (C) Copyright IBM Corp. 2019, 2020.
+ * (C) Copyright IBM Corp. 2023.
*
* 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
@@ -20,6 +20,8 @@ public class TrainingResponse extends GenericModel {
protected List