Skip to content

Commit ceaa843

Browse files
committed
feat(speech-to-text): optional parameter force added to the method upgradeAcousticModel
1 parent d9dc7cc commit ceaa843

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

speech-to-text/v1-generated.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { getMissingParams } from '../lib/helper';
2222
import { FileObject } from '../lib/helper';
2323

2424
/**
25-
* The IBM® Speech to Text service provides APIs that use IBM's speech-recognition capabilities to produce transcripts of spoken audio. The service can transcribe speech from various languages and audio formats. It addition to basic transcription, the service can produce detailed information about many different aspects of the audio. For most languages, the service supports two sampling rates, broadband and narrowband. It returns all JSON response content in the UTF-8 character set. For speech recognition, the service supports synchronous and asynchronous HTTP Representational State Transfer (REST) interfaces. It also supports a WebSocket interface that provides a full-duplex, low-latency communication channel: Clients send requests and audio to the service and receive results over a single connection asynchronously. The service also offers two customization interfaces. Use language model customization to expand the vocabulary of a base model with domain-specific terminology. Use acoustic model customization to adapt a base model for the acoustic characteristics of your audio. For language model customization, the service also supports grammars. A grammar is a formal language specification that lets you restrict the phrases that the service can recognize. Language model customization is generally available for production use with most supported languages. Acoustic model customization is beta functionality that is available for all supported languages.
25+
* The IBM® Speech to Text service provides APIs that use IBM's speech-recognition capabilities to produce transcripts of spoken audio. The service can transcribe speech from various languages and audio formats. In addition to basic transcription, the service can produce detailed information about many different aspects of the audio. For most languages, the service supports two sampling rates, broadband and narrowband. It returns all JSON response content in the UTF-8 character set. For speech recognition, the service supports synchronous and asynchronous HTTP Representational State Transfer (REST) interfaces. It also supports a WebSocket interface that provides a full-duplex, low-latency communication channel: Clients send requests and audio to the service and receive results over a single connection asynchronously. The service also offers two customization interfaces. Use language model customization to expand the vocabulary of a base model with domain-specific terminology. Use acoustic model customization to adapt a base model for the acoustic characteristics of your audio. For language model customization, the service also supports grammars. A grammar is a formal language specification that lets you restrict the phrases that the service can recognize. Language model customization is generally available for production use with most supported languages. Acoustic model customization is beta functionality that is available for all supported languages.
2626
*/
2727

2828
class SpeechToTextV1 extends BaseService {
@@ -2565,16 +2565,18 @@ class SpeechToTextV1 extends BaseService {
25652565
* existing request completes.
25662566
*
25672567
* You can use the optional `custom_language_model_id` parameter to specify the GUID of a separately created custom
2568-
* language model that is to be used during training. Specify a custom language model if you have verbatim
2568+
* language model that is to be used during training. Train with a custom language model if you have verbatim
25692569
* transcriptions of the audio files that you have added to the custom model or you have either corpora (text files)
2570-
* or a list of words that are relevant to the contents of the audio files. For more information, see the **Create a
2571-
* custom language model** method.
2570+
* or a list of words that are relevant to the contents of the audio files. Both of the custom models must be based on
2571+
* the same version of the same base model for training to succeed.
25722572
*
25732573
* Training can fail to start for the following reasons:
25742574
* * The service is currently handling another request for the custom model, such as another training request or a
25752575
* request to add audio resources to the model.
25762576
* * The custom model contains less than 10 minutes or more than 100 hours of audio data.
25772577
* * One or more of the custom model's audio resources is invalid.
2578+
* * You passed an incompatible custom language model with the `custom_language_model_id` query parameter. Both custom
2579+
* models must be based on the same version of the same base model.
25782580
*
25792581
* **See also:** [Train the custom acoustic
25802582
* model](https://cloud.ibm.com/docs/services/speech-to-text/acoustic-create.html#trainModel).
@@ -2586,7 +2588,8 @@ class SpeechToTextV1 extends BaseService {
25862588
* @param {string} [params.custom_language_model_id] - The customization ID (GUID) of a custom language model that is
25872589
* to be used during training of the custom acoustic model. Specify a custom language model that has been trained with
25882590
* verbatim transcriptions of the audio resources or that contains words that are relevant to the contents of the
2589-
* audio resources.
2591+
* audio resources. The custom language model must be based on the same version of the same base model as the custom
2592+
* acoustic model. The credentials specified with the request must own both custom models.
25902593
* @param {Object} [params.headers] - Custom request headers
25912594
* @param {Function} [callback] - The callback that handles the response.
25922595
* @returns {NodeJS.ReadableStream|void}
@@ -2659,7 +2662,12 @@ class SpeechToTextV1 extends BaseService {
26592662
* custom model.
26602663
* @param {string} [params.custom_language_model_id] - If the custom acoustic model was trained with a custom language
26612664
* model, the customization ID (GUID) of that custom language model. The custom language model must be upgraded before
2662-
* the custom acoustic model can be upgraded.
2665+
* the custom acoustic model can be upgraded. The credentials specified with the request must own both custom models.
2666+
* @param {boolean} [params.force] - If `true`, forces the upgrade of a custom acoustic model for which no input data
2667+
* has been modified since it was last trained. Use this parameter only to force the upgrade of a custom acoustic
2668+
* model that is trained with a custom language model, and only if you receive a 400 response code and the message `No
2669+
* input data modified since last training`. See [Upgrading a custom acoustic
2670+
* model](https://cloud.ibm.com/docs/services/speech-to-text/custom-upgrade.html#upgradeAcoustic).
26632671
* @param {Object} [params.headers] - Custom request headers
26642672
* @param {Function} [callback] - The callback that handles the response.
26652673
* @returns {NodeJS.ReadableStream|void}
@@ -2675,7 +2683,8 @@ class SpeechToTextV1 extends BaseService {
26752683
}
26762684

26772685
const query = {
2678-
'custom_language_model_id': _params.custom_language_model_id
2686+
'custom_language_model_id': _params.custom_language_model_id,
2687+
'force': _params.force
26792688
};
26802689

26812690
const path = {
@@ -3710,7 +3719,7 @@ namespace SpeechToTextV1 {
37103719
export interface TrainAcousticModelParams {
37113720
/** The customization ID (GUID) of the custom acoustic model that is to be used for the request. You must make the request with credentials for the instance of the service that owns the custom model. */
37123721
customization_id: string;
3713-
/** The customization ID (GUID) of a custom language model that is to be used during training of the custom acoustic model. Specify a custom language model that has been trained with verbatim transcriptions of the audio resources or that contains words that are relevant to the contents of the audio resources. */
3722+
/** The customization ID (GUID) of a custom language model that is to be used during training of the custom acoustic model. Specify a custom language model that has been trained with verbatim transcriptions of the audio resources or that contains words that are relevant to the contents of the audio resources. The custom language model must be based on the same version of the same base model as the custom acoustic model. The credentials specified with the request must own both custom models. */
37143723
custom_language_model_id?: string;
37153724
headers?: Object;
37163725
}
@@ -3719,8 +3728,10 @@ namespace SpeechToTextV1 {
37193728
export interface UpgradeAcousticModelParams {
37203729
/** The customization ID (GUID) of the custom acoustic model that is to be used for the request. You must make the request with credentials for the instance of the service that owns the custom model. */
37213730
customization_id: string;
3722-
/** If the custom acoustic model was trained with a custom language model, the customization ID (GUID) of that custom language model. The custom language model must be upgraded before the custom acoustic model can be upgraded. */
3731+
/** If the custom acoustic model was trained with a custom language model, the customization ID (GUID) of that custom language model. The custom language model must be upgraded before the custom acoustic model can be upgraded. The credentials specified with the request must own both custom models. */
37233732
custom_language_model_id?: string;
3733+
/** If `true`, forces the upgrade of a custom acoustic model for which no input data has been modified since it was last trained. Use this parameter only to force the upgrade of a custom acoustic model that is trained with a custom language model, and only if you receive a 400 response code and the message `No input data modified since last training`. See [Upgrading a custom acoustic model](https://cloud.ibm.com/docs/services/speech-to-text/custom-upgrade.html#upgradeAcoustic). */
3734+
force?: boolean;
37243735
headers?: Object;
37253736
}
37263737

0 commit comments

Comments
 (0)