ibm_watson 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -39
- data/lib/ibm_watson/assistant_v1.rb +5 -4
- data/lib/ibm_watson/assistant_v2.rb +3 -3
- data/lib/ibm_watson/discovery_v1.rb +7 -14
- data/lib/ibm_watson/discovery_v2.rb +109 -108
- data/lib/ibm_watson/language_translator_v3.rb +2 -2
- data/lib/ibm_watson/natural_language_understanding_v1.rb +12 -14
- data/lib/ibm_watson/speech_to_text_v1.rb +581 -402
- data/lib/ibm_watson/text_to_speech_v1.rb +87 -166
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson.rb +0 -6
- metadata +2 -20
- data/lib/ibm_watson/compare_comply_v1.rb +0 -683
- data/lib/ibm_watson/natural_language_classifier_v1.rb +0 -258
- data/lib/ibm_watson/personality_insights_v3.rb +0 -223
- data/lib/ibm_watson/tone_analyzer_v3.rb +0 -230
- data/lib/ibm_watson/visual_recognition_v3.rb +0 -517
- data/lib/ibm_watson/visual_recognition_v4.rb +0 -930
- data/test/integration/test_compare_comply_v1.rb +0 -105
- data/test/integration/test_natural_language_classifier_v1.rb +0 -80
- data/test/integration/test_personality_insights_v3.rb +0 -81
- data/test/integration/test_tone_analyzer_v3.rb +0 -66
- data/test/integration/test_visual_recognition_v3.rb +0 -68
- data/test/integration/test_visual_recognition_v4.rb +0 -87
- data/test/unit/test_compare_comply_v1.rb +0 -232
- data/test/unit/test_natural_language_classifier_v1.rb +0 -191
- data/test/unit/test_personality_insights_v3.rb +0 -192
- data/test/unit/test_tone_analyzer_v3.rb +0 -217
- data/test/unit/test_visual_recognition_v3.rb +0 -300
- data/test/unit/test_visual_recognition_v4.rb +0 -422
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# (C) Copyright IBM Corp. 2018,
|
3
|
+
# (C) Copyright IBM Corp. 2018, 2022.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -14,21 +14,28 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
|
18
18
|
#
|
19
19
|
# The IBM Watson™ Speech to Text service provides APIs that use IBM's
|
20
|
-
# speech-recognition capabilities to produce transcripts of spoken audio.
|
20
|
+
# speech-recognition capabilities to produce transcripts of spoken audio. The service can
|
21
21
|
# transcribe speech from various languages and audio formats. In addition to basic
|
22
22
|
# transcription, the service can produce detailed information about many different aspects
|
23
23
|
# of the audio. It returns all JSON response content in the UTF-8 character set.
|
24
24
|
#
|
25
25
|
# The service supports two types of models: previous-generation models that include the
|
26
|
-
# terms `Broadband` and `Narrowband` in their names, and
|
26
|
+
# terms `Broadband` and `Narrowband` in their names, and next-generation models that
|
27
27
|
# include the terms `Multimedia` and `Telephony` in their names. Broadband and multimedia
|
28
28
|
# models have minimum sampling rates of 16 kHz. Narrowband and telephony models have
|
29
|
-
# minimum sampling rates of 8 kHz. The
|
30
|
-
#
|
31
|
-
#
|
29
|
+
# minimum sampling rates of 8 kHz. The next-generation models offer high throughput and
|
30
|
+
# greater transcription accuracy.
|
31
|
+
#
|
32
|
+
# Effective 15 March 2022, previous-generation models for all languages other than Arabic
|
33
|
+
# and Japanese are deprecated. The deprecated models remain available until 15 September
|
34
|
+
# 2022, when they will be removed from the service and the documentation. You must migrate
|
35
|
+
# to the equivalent next-generation model by the end of service date. For more
|
36
|
+
# information, see [Migrating to next-generation
|
37
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).{:
|
38
|
+
# deprecated}
|
32
39
|
#
|
33
40
|
# For speech recognition, the service supports synchronous and asynchronous HTTP
|
34
41
|
# Representational State Transfer (REST) interfaces. It also supports a WebSocket
|
@@ -43,10 +50,9 @@
|
|
43
50
|
# is a formal language specification that lets you restrict the phrases that the service
|
44
51
|
# can recognize.
|
45
52
|
#
|
46
|
-
# Language model customization and
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# model customization. Next-generation models do not support customization at this time.
|
53
|
+
# Language model customization and grammars are available for most previous- and
|
54
|
+
# next-generation models. Acoustic model customization is available for all
|
55
|
+
# previous-generation models.
|
50
56
|
|
51
57
|
require "concurrent"
|
52
58
|
require "erb"
|
@@ -96,8 +102,8 @@ module IBMWatson
|
|
96
102
|
# among other things. The ordering of the list of models can change from call to
|
97
103
|
# call; do not rely on an alphabetized or static list of models.
|
98
104
|
#
|
99
|
-
# **See also:** [Listing
|
100
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list).
|
105
|
+
# **See also:** [Listing all
|
106
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list#models-list-all).
|
101
107
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
102
108
|
def list_models
|
103
109
|
headers = {
|
@@ -123,11 +129,11 @@ module IBMWatson
|
|
123
129
|
# with the service. The information includes the name of the model and its minimum
|
124
130
|
# sampling rate in Hertz, among other things.
|
125
131
|
#
|
126
|
-
# **See also:** [Listing
|
127
|
-
#
|
128
|
-
# @param model_id [String] The identifier of the model in the form of its name from the output of the
|
129
|
-
#
|
130
|
-
# `ar-MS_BroadbandModel` instead.).
|
132
|
+
# **See also:** [Listing a specific
|
133
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list#models-list-specific).
|
134
|
+
# @param model_id [String] The identifier of the model in the form of its name from the output of the [List
|
135
|
+
# models](#listmodels) method. (**Note:** The model `ar-AR_BroadbandModel` is
|
136
|
+
# deprecated; use `ar-MS_BroadbandModel` instead.).
|
131
137
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
132
138
|
def get_model(model_id:)
|
133
139
|
raise ArgumentError.new("model_id must be provided") if model_id.nil?
|
@@ -225,39 +231,38 @@ module IBMWatson
|
|
225
231
|
#
|
226
232
|
# ### Next-generation models
|
227
233
|
#
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
#
|
232
|
-
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8 kHz)
|
233
|
-
# models for many languages. Next-generation models have higher throughput than the
|
234
|
-
# service's previous generation of `Broadband` and `Narrowband` models. When you use
|
235
|
-
# next-generation models, the service can return transcriptions more quickly and
|
234
|
+
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8
|
235
|
+
# kHz) models for many languages. Next-generation models have higher throughput than
|
236
|
+
# the service's previous generation of `Broadband` and `Narrowband` models. When you
|
237
|
+
# use next-generation models, the service can return transcriptions more quickly and
|
236
238
|
# also provide noticeably better transcription accuracy.
|
237
239
|
#
|
238
240
|
# You specify a next-generation model by using the `model` query parameter, as you
|
239
|
-
# do a previous-generation model.
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
# * `inactivity_timeout`
|
244
|
-
# * `profanity_filter`
|
245
|
-
# * `redaction`
|
246
|
-
# * `smart_formatting`
|
247
|
-
# * `speaker_labels`
|
248
|
-
# * `speech_detector_sensitivity`
|
249
|
-
# * `timestamps`
|
241
|
+
# do a previous-generation model. Many next-generation models also support the
|
242
|
+
# `low_latency` parameter, which is not available with previous-generation models.
|
243
|
+
# Next-generation models do not support all of the parameters that are available for
|
244
|
+
# use with previous-generation models.
|
250
245
|
#
|
251
|
-
#
|
252
|
-
#
|
246
|
+
# **Important:** Effective 15 March 2022, previous-generation models for all
|
247
|
+
# languages other than Arabic and Japanese are deprecated. The deprecated models
|
248
|
+
# remain available until 15 September 2022, when they will be removed from the
|
249
|
+
# service and the documentation. You must migrate to the equivalent next-generation
|
250
|
+
# model by the end of service date. For more information, see [Migrating to
|
251
|
+
# next-generation
|
252
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
|
253
253
|
#
|
254
|
-
#
|
255
|
-
#
|
254
|
+
#
|
255
|
+
# **See also:**
|
256
|
+
# * [Next-generation languages and
|
257
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng)
|
258
|
+
# * [Supported features for next-generation
|
259
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features)
|
256
260
|
#
|
257
261
|
#
|
258
262
|
# ### Multipart speech recognition
|
259
263
|
#
|
260
|
-
# **Note:** The
|
264
|
+
# **Note:** The asynchronous HTTP interface, WebSocket interface, and Watson SDKs
|
265
|
+
# do not support multipart speech recognition.
|
261
266
|
#
|
262
267
|
# The HTTP `POST` method of the service also supports multipart speech recognition.
|
263
268
|
# With multipart requests, you pass all audio data as multipart form data. You
|
@@ -277,10 +282,8 @@ module IBMWatson
|
|
277
282
|
# audio format, see **Audio formats (content types)** in the method description.
|
278
283
|
# @param model [String] The identifier of the model that is to be used for the recognition request.
|
279
284
|
# (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
|
280
|
-
# `ar-MS_BroadbandModel` instead.) See [
|
281
|
-
#
|
282
|
-
# [Next-generation languages and
|
283
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
285
|
+
# `ar-MS_BroadbandModel` instead.) See [Using a model for speech
|
286
|
+
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use).
|
284
287
|
# @param language_customization_id [String] The customization ID (GUID) of a custom language model that is to be used with the
|
285
288
|
# recognition request. The base model of the specified custom language model must
|
286
289
|
# match the model specified with the `model` parameter. You must make the request
|
@@ -365,8 +368,10 @@ module IBMWatson
|
|
365
368
|
# timestamps](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-metadata#word-timestamps).
|
366
369
|
# @param profanity_filter [Boolean] If `true`, the service filters profanity from all output except for keyword
|
367
370
|
# results by replacing inappropriate words with a series of asterisks. Set the
|
368
|
-
# parameter to `false` to return results with no censoring.
|
369
|
-
#
|
371
|
+
# parameter to `false` to return results with no censoring.
|
372
|
+
#
|
373
|
+
# **Note:** The parameter can be used with US English and Japanese transcription
|
374
|
+
# only. See [Profanity
|
370
375
|
# filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#profanity-filtering).
|
371
376
|
# @param smart_formatting [Boolean] If `true`, the service converts dates, times, series of digits and numbers, phone
|
372
377
|
# numbers, currency values, and internet addresses into more readable, conventional
|
@@ -374,7 +379,8 @@ module IBMWatson
|
|
374
379
|
# the service also converts certain keyword strings to punctuation symbols. By
|
375
380
|
# default, the service performs no smart formatting.
|
376
381
|
#
|
377
|
-
# **Note:**
|
382
|
+
# **Note:** The parameter can be used with US English, Japanese, and Spanish (all
|
383
|
+
# dialects) transcription only.
|
378
384
|
#
|
379
385
|
# See [Smart
|
380
386
|
# formatting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#smart-formatting).
|
@@ -383,14 +389,14 @@ module IBMWatson
|
|
383
389
|
# speaker labels. Setting `speaker_labels` to `true` forces the `timestamps`
|
384
390
|
# parameter to be `true`, regardless of whether you specify `false` for the
|
385
391
|
# parameter.
|
386
|
-
# *
|
387
|
-
# German, Japanese, Korean, and Spanish (both broadband and
|
388
|
-
# UK English (narrowband model) transcription only.
|
389
|
-
# *
|
390
|
-
# German, and Spanish
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
392
|
+
# * _For previous-generation models,_ the parameter can be used with Australian
|
393
|
+
# English, US English, German, Japanese, Korean, and Spanish (both broadband and
|
394
|
+
# narrowband models) and UK English (narrowband model) transcription only.
|
395
|
+
# * _For next-generation models,_ the parameter can be used with Czech, English
|
396
|
+
# (Australian, Indian, UK, and US), German, Japanese, Korean, and Spanish
|
397
|
+
# transcription only.
|
398
|
+
#
|
399
|
+
# See [Speaker
|
394
400
|
# labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels).
|
395
401
|
# @param customization_id [String] **Deprecated.** Use the `language_customization_id` parameter to specify the
|
396
402
|
# customization ID (GUID) of a custom language model that is to be used with the
|
@@ -399,8 +405,9 @@ module IBMWatson
|
|
399
405
|
# specify a grammar, you must also use the `language_customization_id` parameter to
|
400
406
|
# specify the name of the custom language model for which the grammar is defined.
|
401
407
|
# The service recognizes only strings that are recognized by the specified grammar;
|
402
|
-
# it does not recognize other custom words from the model's words resource.
|
403
|
-
#
|
408
|
+
# it does not recognize other custom words from the model's words resource.
|
409
|
+
#
|
410
|
+
# See [Using a grammar for speech
|
404
411
|
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse).
|
405
412
|
# @param redaction [Boolean] If `true`, the service redacts, or masks, numeric data from final transcripts. The
|
406
413
|
# feature redacts any number that has three or more consecutive digits by replacing
|
@@ -413,7 +420,8 @@ module IBMWatson
|
|
413
420
|
# `keywords_threshold` parameters) and returns only a single final transcript
|
414
421
|
# (forces the `max_alternatives` parameter to be `1`).
|
415
422
|
#
|
416
|
-
# **Note:**
|
423
|
+
# **Note:** The parameter can be used with US English, Japanese, and Korean
|
424
|
+
# transcription only.
|
417
425
|
#
|
418
426
|
# See [Numeric
|
419
427
|
# redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction).
|
@@ -445,8 +453,11 @@ module IBMWatson
|
|
445
453
|
# meaningful phrases such as sentences. The service bases its understanding of
|
446
454
|
# semantic features on the base language model that you use with a request. Custom
|
447
455
|
# language models and grammars can also influence how and where the service splits a
|
448
|
-
# transcript.
|
449
|
-
#
|
456
|
+
# transcript.
|
457
|
+
#
|
458
|
+
# By default, the service splits transcripts based solely on the pause interval. If
|
459
|
+
# the parameters are used together on the same request, `end_of_phrase_silence_time`
|
460
|
+
# has precedence over `split_transcript_at_phrase_end`.
|
450
461
|
#
|
451
462
|
# See [Split transcript at phrase
|
452
463
|
# end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#split-transcript).
|
@@ -461,8 +472,13 @@ module IBMWatson
|
|
461
472
|
# * 0.5 (the default) provides a reasonable compromise for the level of sensitivity.
|
462
473
|
# * 1.0 suppresses no audio (speech detection sensitivity is disabled).
|
463
474
|
#
|
464
|
-
# The values increase on a monotonic curve.
|
465
|
-
#
|
475
|
+
# The values increase on a monotonic curve.
|
476
|
+
#
|
477
|
+
# The parameter is supported with all next-generation models and with most
|
478
|
+
# previous-generation models. See [Speech detector
|
479
|
+
# sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity)
|
480
|
+
# and [Language model
|
481
|
+
# support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
|
466
482
|
# @param background_audio_suppression [Float] The level to which the service is to suppress background audio based on its volume
|
467
483
|
# to prevent it from being transcribed as speech. Use the parameter to suppress side
|
468
484
|
# conversations or background noise.
|
@@ -473,8 +489,13 @@ module IBMWatson
|
|
473
489
|
# * 0.5 provides a reasonable level of audio suppression for general usage.
|
474
490
|
# * 1.0 suppresses all audio (no audio is transcribed).
|
475
491
|
#
|
476
|
-
# The values increase on a monotonic curve.
|
477
|
-
#
|
492
|
+
# The values increase on a monotonic curve.
|
493
|
+
#
|
494
|
+
# The parameter is supported with all next-generation models and with most
|
495
|
+
# previous-generation models. See [Background audio
|
496
|
+
# suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression)
|
497
|
+
# and [Language model
|
498
|
+
# support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
|
478
499
|
# @param low_latency [Boolean] If `true` for next-generation `Multimedia` and `Telephony` models that support low
|
479
500
|
# latency, directs the service to produce results even more quickly than it usually
|
480
501
|
# does. Next-generation models produce transcription results faster than
|
@@ -482,14 +503,11 @@ module IBMWatson
|
|
482
503
|
# produce results even more quickly, though the results might be less accurate when
|
483
504
|
# the parameter is used.
|
484
505
|
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
# language
|
491
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported)
|
492
|
-
# for next-generation models.
|
506
|
+
# The parameter is not available for previous-generation `Broadband` and
|
507
|
+
# `Narrowband` models. It is available only for some next-generation models. For a
|
508
|
+
# list of next-generation models that support low latency, see [Supported
|
509
|
+
# next-generation language
|
510
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported).
|
493
511
|
# * For more information about the `low_latency` parameter, see [Low
|
494
512
|
# latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency).
|
495
513
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -760,6 +778,7 @@ module IBMWatson
|
|
760
778
|
options.delete_if { |_, v| v.nil? }
|
761
779
|
WebSocketClient.new(audio: audio, chunk_data: chunk_data, options: options, recognize_callback: recognize_callback, service_url: service_url, headers: headers, disable_ssl_verification: @disable_ssl_verification)
|
762
780
|
end
|
781
|
+
|
763
782
|
#########################
|
764
783
|
# Asynchronous
|
765
784
|
#########################
|
@@ -783,9 +802,9 @@ module IBMWatson
|
|
783
802
|
# The service sends only a single `GET` request to the callback URL. If the service
|
784
803
|
# does not receive a reply with a response code of 200 and a body that echoes the
|
785
804
|
# challenge string sent by the service within five seconds, it does not allowlist
|
786
|
-
# the URL; it instead sends status code 400 in response to the
|
787
|
-
# callback
|
788
|
-
#
|
805
|
+
# the URL; it instead sends status code 400 in response to the request to register a
|
806
|
+
# callback. If the requested callback URL is already allowlisted, the service
|
807
|
+
# responds to the initial registration request with response code 200.
|
789
808
|
#
|
790
809
|
# If you specify a user secret with the request, the service uses it as a key to
|
791
810
|
# calculate an HMAC-SHA1 signature of the challenge string in its response to the
|
@@ -840,9 +859,10 @@ module IBMWatson
|
|
840
859
|
##
|
841
860
|
# @!method unregister_callback(callback_url:)
|
842
861
|
# Unregister a callback.
|
843
|
-
# Unregisters a callback URL that was previously allowlisted with a
|
844
|
-
# callback
|
845
|
-
# URL can no longer be used with asynchronous recognition
|
862
|
+
# Unregisters a callback URL that was previously allowlisted with a [Register a
|
863
|
+
# callback](#registercallback) request for use with the asynchronous interface. Once
|
864
|
+
# unregistered, the URL can no longer be used with asynchronous recognition
|
865
|
+
# requests.
|
846
866
|
#
|
847
867
|
# **See also:** [Unregistering a callback
|
848
868
|
# URL](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#unregister).
|
@@ -885,17 +905,17 @@ module IBMWatson
|
|
885
905
|
# to subscribe to specific events and to specify a string that is to be included
|
886
906
|
# with each notification for the job.
|
887
907
|
# * By polling the service: Omit the `callback_url`, `events`, and `user_token`
|
888
|
-
# parameters. You must then use the
|
889
|
-
# check the status of the job, using the latter to
|
890
|
-
# is complete.
|
908
|
+
# parameters. You must then use the [Check jobs](#checkjobs) or [Check a
|
909
|
+
# job](#checkjob) methods to check the status of the job, using the latter to
|
910
|
+
# retrieve the results when the job is complete.
|
891
911
|
#
|
892
912
|
# The two approaches are not mutually exclusive. You can poll the service for job
|
893
913
|
# status or obtain results from the service manually even if you include a callback
|
894
914
|
# URL. In both cases, you can include the `results_ttl` parameter to specify how
|
895
915
|
# long the results are to remain available after the job is complete. Using the
|
896
|
-
# HTTPS
|
897
|
-
# them via callback notification over HTTP because it provides
|
898
|
-
# addition to authentication and data integrity.
|
916
|
+
# HTTPS [Check a job](#checkjob) method to retrieve results is more secure than
|
917
|
+
# receiving them via callback notification over HTTP because it provides
|
918
|
+
# confidentiality in addition to authentication and data integrity.
|
899
919
|
#
|
900
920
|
# The method supports the same basic parameters as other HTTP and WebSocket
|
901
921
|
# recognition requests. It also supports the following parameters specific to the
|
@@ -975,47 +995,43 @@ module IBMWatson
|
|
975
995
|
#
|
976
996
|
# ### Next-generation models
|
977
997
|
#
|
978
|
-
#
|
979
|
-
#
|
980
|
-
#
|
981
|
-
#
|
982
|
-
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8 kHz)
|
983
|
-
# models for many languages. Next-generation models have higher throughput than the
|
984
|
-
# service's previous generation of `Broadband` and `Narrowband` models. When you use
|
985
|
-
# next-generation models, the service can return transcriptions more quickly and
|
998
|
+
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8
|
999
|
+
# kHz) models for many languages. Next-generation models have higher throughput than
|
1000
|
+
# the service's previous generation of `Broadband` and `Narrowband` models. When you
|
1001
|
+
# use next-generation models, the service can return transcriptions more quickly and
|
986
1002
|
# also provide noticeably better transcription accuracy.
|
987
1003
|
#
|
988
1004
|
# You specify a next-generation model by using the `model` query parameter, as you
|
989
|
-
# do a previous-generation model.
|
990
|
-
#
|
991
|
-
#
|
992
|
-
#
|
993
|
-
#
|
994
|
-
#
|
995
|
-
#
|
996
|
-
#
|
997
|
-
#
|
998
|
-
#
|
999
|
-
#
|
1000
|
-
#
|
1001
|
-
#
|
1002
|
-
#
|
1003
|
-
#
|
1004
|
-
#
|
1005
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng)
|
1005
|
+
# do a previous-generation model. Many next-generation models also support the
|
1006
|
+
# `low_latency` parameter, which is not available with previous-generation models.
|
1007
|
+
# Next-generation models do not support all of the parameters that are available for
|
1008
|
+
# use with previous-generation models.
|
1009
|
+
#
|
1010
|
+
# **Important:** Effective 15 March 2022, previous-generation models for all
|
1011
|
+
# languages other than Arabic and Japanese are deprecated. The deprecated models
|
1012
|
+
# remain available until 15 September 2022, when they will be removed from the
|
1013
|
+
# service and the documentation. You must migrate to the equivalent next-generation
|
1014
|
+
# model by the end of service date. For more information, see [Migrating to
|
1015
|
+
# next-generation
|
1016
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
|
1017
|
+
#
|
1018
|
+
#
|
1019
|
+
# **See also:**
|
1020
|
+
# * [Next-generation languages and
|
1021
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng)
|
1022
|
+
# * [Supported features for next-generation
|
1023
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features).
|
1006
1024
|
# @param audio [File] The audio to transcribe.
|
1007
1025
|
# @param content_type [String] The format (MIME type) of the audio. For more information about specifying an
|
1008
1026
|
# audio format, see **Audio formats (content types)** in the method description.
|
1009
1027
|
# @param model [String] The identifier of the model that is to be used for the recognition request.
|
1010
1028
|
# (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
|
1011
|
-
# `ar-MS_BroadbandModel` instead.) See [
|
1012
|
-
#
|
1013
|
-
# [Next-generation languages and
|
1014
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
1029
|
+
# `ar-MS_BroadbandModel` instead.) See [Using a model for speech
|
1030
|
+
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use).
|
1015
1031
|
# @param callback_url [String] A URL to which callback notifications are to be sent. The URL must already be
|
1016
|
-
# successfully allowlisted by using the
|
1017
|
-
# include the same callback URL with any number of job creation
|
1018
|
-
# parameter to poll the service for job completion and results.
|
1032
|
+
# successfully allowlisted by using the [Register a callback](#registercallback)
|
1033
|
+
# method. You can include the same callback URL with any number of job creation
|
1034
|
+
# requests. Omit the parameter to poll the service for job completion and results.
|
1019
1035
|
#
|
1020
1036
|
# Use the `user_token` parameter to specify a unique user-specified string with each
|
1021
1037
|
# job to differentiate the callback notifications for the jobs.
|
@@ -1024,8 +1040,8 @@ module IBMWatson
|
|
1024
1040
|
# * `recognitions.started` generates a callback notification when the service begins
|
1025
1041
|
# to process the job.
|
1026
1042
|
# * `recognitions.completed` generates a callback notification when the job is
|
1027
|
-
# complete. You must use the
|
1028
|
-
# they time out or are deleted.
|
1043
|
+
# complete. You must use the [Check a job](#checkjob) method to retrieve the results
|
1044
|
+
# before they time out or are deleted.
|
1029
1045
|
# * `recognitions.completed_with_results` generates a callback notification when the
|
1030
1046
|
# job is complete. The notification includes the results of the request.
|
1031
1047
|
# * `recognitions.failed` generates a callback notification if the service
|
@@ -1130,8 +1146,10 @@ module IBMWatson
|
|
1130
1146
|
# timestamps](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-metadata#word-timestamps).
|
1131
1147
|
# @param profanity_filter [Boolean] If `true`, the service filters profanity from all output except for keyword
|
1132
1148
|
# results by replacing inappropriate words with a series of asterisks. Set the
|
1133
|
-
# parameter to `false` to return results with no censoring.
|
1134
|
-
#
|
1149
|
+
# parameter to `false` to return results with no censoring.
|
1150
|
+
#
|
1151
|
+
# **Note:** The parameter can be used with US English and Japanese transcription
|
1152
|
+
# only. See [Profanity
|
1135
1153
|
# filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#profanity-filtering).
|
1136
1154
|
# @param smart_formatting [Boolean] If `true`, the service converts dates, times, series of digits and numbers, phone
|
1137
1155
|
# numbers, currency values, and internet addresses into more readable, conventional
|
@@ -1139,7 +1157,8 @@ module IBMWatson
|
|
1139
1157
|
# the service also converts certain keyword strings to punctuation symbols. By
|
1140
1158
|
# default, the service performs no smart formatting.
|
1141
1159
|
#
|
1142
|
-
# **Note:**
|
1160
|
+
# **Note:** The parameter can be used with US English, Japanese, and Spanish (all
|
1161
|
+
# dialects) transcription only.
|
1143
1162
|
#
|
1144
1163
|
# See [Smart
|
1145
1164
|
# formatting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#smart-formatting).
|
@@ -1148,14 +1167,14 @@ module IBMWatson
|
|
1148
1167
|
# speaker labels. Setting `speaker_labels` to `true` forces the `timestamps`
|
1149
1168
|
# parameter to be `true`, regardless of whether you specify `false` for the
|
1150
1169
|
# parameter.
|
1151
|
-
# *
|
1152
|
-
# German, Japanese, Korean, and Spanish (both broadband and
|
1153
|
-
# UK English (narrowband model) transcription only.
|
1154
|
-
# *
|
1155
|
-
# German, and Spanish
|
1156
|
-
#
|
1157
|
-
#
|
1158
|
-
#
|
1170
|
+
# * _For previous-generation models,_ the parameter can be used with Australian
|
1171
|
+
# English, US English, German, Japanese, Korean, and Spanish (both broadband and
|
1172
|
+
# narrowband models) and UK English (narrowband model) transcription only.
|
1173
|
+
# * _For next-generation models,_ the parameter can be used with Czech, English
|
1174
|
+
# (Australian, Indian, UK, and US), German, Japanese, Korean, and Spanish
|
1175
|
+
# transcription only.
|
1176
|
+
#
|
1177
|
+
# See [Speaker
|
1159
1178
|
# labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels).
|
1160
1179
|
# @param customization_id [String] **Deprecated.** Use the `language_customization_id` parameter to specify the
|
1161
1180
|
# customization ID (GUID) of a custom language model that is to be used with the
|
@@ -1164,8 +1183,9 @@ module IBMWatson
|
|
1164
1183
|
# specify a grammar, you must also use the `language_customization_id` parameter to
|
1165
1184
|
# specify the name of the custom language model for which the grammar is defined.
|
1166
1185
|
# The service recognizes only strings that are recognized by the specified grammar;
|
1167
|
-
# it does not recognize other custom words from the model's words resource.
|
1168
|
-
#
|
1186
|
+
# it does not recognize other custom words from the model's words resource.
|
1187
|
+
#
|
1188
|
+
# See [Using a grammar for speech
|
1169
1189
|
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse).
|
1170
1190
|
# @param redaction [Boolean] If `true`, the service redacts, or masks, numeric data from final transcripts. The
|
1171
1191
|
# feature redacts any number that has three or more consecutive digits by replacing
|
@@ -1178,7 +1198,8 @@ module IBMWatson
|
|
1178
1198
|
# `keywords_threshold` parameters) and returns only a single final transcript
|
1179
1199
|
# (forces the `max_alternatives` parameter to be `1`).
|
1180
1200
|
#
|
1181
|
-
# **Note:**
|
1201
|
+
# **Note:** The parameter can be used with US English, Japanese, and Korean
|
1202
|
+
# transcription only.
|
1182
1203
|
#
|
1183
1204
|
# See [Numeric
|
1184
1205
|
# redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction).
|
@@ -1232,8 +1253,11 @@ module IBMWatson
|
|
1232
1253
|
# meaningful phrases such as sentences. The service bases its understanding of
|
1233
1254
|
# semantic features on the base language model that you use with a request. Custom
|
1234
1255
|
# language models and grammars can also influence how and where the service splits a
|
1235
|
-
# transcript.
|
1236
|
-
#
|
1256
|
+
# transcript.
|
1257
|
+
#
|
1258
|
+
# By default, the service splits transcripts based solely on the pause interval. If
|
1259
|
+
# the parameters are used together on the same request, `end_of_phrase_silence_time`
|
1260
|
+
# has precedence over `split_transcript_at_phrase_end`.
|
1237
1261
|
#
|
1238
1262
|
# See [Split transcript at phrase
|
1239
1263
|
# end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#split-transcript).
|
@@ -1248,8 +1272,13 @@ module IBMWatson
|
|
1248
1272
|
# * 0.5 (the default) provides a reasonable compromise for the level of sensitivity.
|
1249
1273
|
# * 1.0 suppresses no audio (speech detection sensitivity is disabled).
|
1250
1274
|
#
|
1251
|
-
# The values increase on a monotonic curve.
|
1252
|
-
#
|
1275
|
+
# The values increase on a monotonic curve.
|
1276
|
+
#
|
1277
|
+
# The parameter is supported with all next-generation models and with most
|
1278
|
+
# previous-generation models. See [Speech detector
|
1279
|
+
# sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity)
|
1280
|
+
# and [Language model
|
1281
|
+
# support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
|
1253
1282
|
# @param background_audio_suppression [Float] The level to which the service is to suppress background audio based on its volume
|
1254
1283
|
# to prevent it from being transcribed as speech. Use the parameter to suppress side
|
1255
1284
|
# conversations or background noise.
|
@@ -1260,8 +1289,13 @@ module IBMWatson
|
|
1260
1289
|
# * 0.5 provides a reasonable level of audio suppression for general usage.
|
1261
1290
|
# * 1.0 suppresses all audio (no audio is transcribed).
|
1262
1291
|
#
|
1263
|
-
# The values increase on a monotonic curve.
|
1264
|
-
#
|
1292
|
+
# The values increase on a monotonic curve.
|
1293
|
+
#
|
1294
|
+
# The parameter is supported with all next-generation models and with most
|
1295
|
+
# previous-generation models. See [Background audio
|
1296
|
+
# suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression)
|
1297
|
+
# and [Language model
|
1298
|
+
# support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support).
|
1265
1299
|
# @param low_latency [Boolean] If `true` for next-generation `Multimedia` and `Telephony` models that support low
|
1266
1300
|
# latency, directs the service to produce results even more quickly than it usually
|
1267
1301
|
# does. Next-generation models produce transcription results faster than
|
@@ -1269,14 +1303,11 @@ module IBMWatson
|
|
1269
1303
|
# produce results even more quickly, though the results might be less accurate when
|
1270
1304
|
# the parameter is used.
|
1271
1305
|
#
|
1272
|
-
#
|
1273
|
-
#
|
1274
|
-
#
|
1275
|
-
#
|
1276
|
-
#
|
1277
|
-
# language
|
1278
|
-
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported)
|
1279
|
-
# for next-generation models.
|
1306
|
+
# The parameter is not available for previous-generation `Broadband` and
|
1307
|
+
# `Narrowband` models. It is available only for some next-generation models. For a
|
1308
|
+
# list of next-generation models that support low latency, see [Supported
|
1309
|
+
# next-generation language
|
1310
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported).
|
1280
1311
|
# * For more information about the `low_latency` parameter, see [Low
|
1281
1312
|
# latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency).
|
1282
1313
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1345,10 +1376,10 @@ module IBMWatson
|
|
1345
1376
|
# credentials with which it is called. The method also returns the creation and
|
1346
1377
|
# update times of each job, and, if a job was created with a callback URL and a user
|
1347
1378
|
# token, the user token for the job. To obtain the results for a job whose status is
|
1348
|
-
# `completed` or not one of the latest 100 outstanding jobs, use the
|
1349
|
-
# method. A job and its results remain available until you delete
|
1350
|
-
#
|
1351
|
-
# first.
|
1379
|
+
# `completed` or not one of the latest 100 outstanding jobs, use the [Check a
|
1380
|
+
# job[(#checkjob) method. A job and its results remain available until you delete
|
1381
|
+
# them with the [Delete a job](#deletejob) method or until the job's time to live
|
1382
|
+
# expires, whichever comes first.
|
1352
1383
|
#
|
1353
1384
|
# **See also:** [Checking the status of the latest
|
1354
1385
|
# jobs](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#jobs).
|
@@ -1382,8 +1413,8 @@ module IBMWatson
|
|
1382
1413
|
# You can use the method to retrieve the results of any job, regardless of whether
|
1383
1414
|
# it was submitted with a callback URL and the `recognitions.completed_with_results`
|
1384
1415
|
# event, and you can retrieve the results multiple times for as long as they remain
|
1385
|
-
# available. Use the
|
1386
|
-
# recent jobs associated with the calling credentials.
|
1416
|
+
# available. Use the [Check jobs](#checkjobs) method to request information about
|
1417
|
+
# the most recent jobs associated with the calling credentials.
|
1387
1418
|
#
|
1388
1419
|
# **See also:** [Checking the status and retrieving the results of a
|
1389
1420
|
# job](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#job).
|
@@ -1460,8 +1491,20 @@ module IBMWatson
|
|
1460
1491
|
# do not lose any models, but you cannot create any more until your model count is
|
1461
1492
|
# below the limit.
|
1462
1493
|
#
|
1463
|
-
# **
|
1464
|
-
#
|
1494
|
+
# **Important:** Effective 15 March 2022, previous-generation models for all
|
1495
|
+
# languages other than Arabic and Japanese are deprecated. The deprecated models
|
1496
|
+
# remain available until 15 September 2022, when they will be removed from the
|
1497
|
+
# service and the documentation. You must migrate to the equivalent next-generation
|
1498
|
+
# model by the end of service date. For more information, see [Migrating to
|
1499
|
+
# next-generation
|
1500
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
|
1501
|
+
#
|
1502
|
+
#
|
1503
|
+
# **See also:**
|
1504
|
+
# * [Create a custom language
|
1505
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#createModel-language)
|
1506
|
+
# * [Language support for
|
1507
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1465
1508
|
# @param name [String] A user-defined name for the new custom language model. Use a name that is unique
|
1466
1509
|
# among all custom language models that you own. Use a localized name that matches
|
1467
1510
|
# the language of the custom model. Use a name that describes the domain of the
|
@@ -1471,28 +1514,26 @@ module IBMWatson
|
|
1471
1514
|
# customizes.
|
1472
1515
|
#
|
1473
1516
|
# To determine whether a base model supports language model customization, use the
|
1474
|
-
#
|
1475
|
-
# to `true`. You can also refer to [Language support
|
1476
|
-
#
|
1517
|
+
# [Get a model](#getmodel) method and check that the attribute
|
1518
|
+
# `custom_language_model` is set to `true`. You can also refer to [Language support
|
1519
|
+
# for
|
1520
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1477
1521
|
# @param dialect [String] The dialect of the specified language that is to be used with the custom language
|
1478
|
-
# model.
|
1479
|
-
#
|
1480
|
-
# models.
|
1481
|
-
#
|
1482
|
-
#
|
1483
|
-
#
|
1522
|
+
# model. _For all languages, it is always safe to omit this field._ The service
|
1523
|
+
# automatically uses the language identifier from the name of the base model. For
|
1524
|
+
# example, the service automatically uses `en-US` for all US English models.
|
1525
|
+
#
|
1526
|
+
# If you specify the `dialect` for a new custom model, follow these guidelines. _For
|
1527
|
+
# non-Spanish previous-generation models and for next-generation models,_ you must
|
1528
|
+
# specify a value that matches the five-character language identifier from the name
|
1529
|
+
# of the base model. _For Spanish previous-generation models,_ you must specify one
|
1530
|
+
# of the following values:
|
1484
1531
|
# * `es-ES` for Castilian Spanish (`es-ES` models)
|
1485
1532
|
# * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE`
|
1486
1533
|
# models)
|
1487
1534
|
# * `es-US` for Mexican (North American) Spanish (`es-MX` models)
|
1488
1535
|
#
|
1489
|
-
#
|
1490
|
-
# safely omit the parameter to have the service create the correct mapping.
|
1491
|
-
#
|
1492
|
-
# If you specify the `dialect` parameter for non-Spanish language models, its value
|
1493
|
-
# must match the language of the base model. If you specify the `dialect` for
|
1494
|
-
# Spanish language models, its value must match one of the defined mappings as
|
1495
|
-
# indicated (`es-ES`, `es-LA`, or `es-MX`). All dialect values are case-insensitive.
|
1536
|
+
# All values that you pass for the `dialect` field are case-insensitive.
|
1496
1537
|
# @param description [String] A description of the new custom language model. Use a localized description that
|
1497
1538
|
# matches the language of the custom model.
|
1498
1539
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1534,16 +1575,21 @@ module IBMWatson
|
|
1534
1575
|
# all languages. You must use credentials for the instance of the service that owns
|
1535
1576
|
# a model to list information about it.
|
1536
1577
|
#
|
1537
|
-
# **See also:**
|
1538
|
-
#
|
1578
|
+
# **See also:**
|
1579
|
+
# * [Listing custom language
|
1580
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language)
|
1581
|
+
# * [Language support for
|
1582
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1539
1583
|
# @param language [String] The identifier of the language for which custom language or custom acoustic models
|
1540
|
-
# are to be returned.
|
1541
|
-
#
|
1542
|
-
#
|
1584
|
+
# are to be returned. Specify the five-character language identifier; for example,
|
1585
|
+
# specify `en-US` to see all custom language or custom acoustic models that are
|
1586
|
+
# based on US English models. Omit the parameter to see all custom language or
|
1587
|
+
# custom acoustic models that are owned by the requesting credentials. (**Note:**
|
1588
|
+
# The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
|
1543
1589
|
#
|
1544
1590
|
# To determine the languages for which customization is available, see [Language
|
1545
1591
|
# support for
|
1546
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
1592
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1547
1593
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1548
1594
|
def list_language_models(language: nil)
|
1549
1595
|
headers = {
|
@@ -1573,8 +1619,11 @@ module IBMWatson
|
|
1573
1619
|
# Gets information about a specified custom language model. You must use credentials
|
1574
1620
|
# for the instance of the service that owns a model to list information about it.
|
1575
1621
|
#
|
1576
|
-
# **See also:**
|
1577
|
-
#
|
1622
|
+
# **See also:**
|
1623
|
+
# * [Listing custom language
|
1624
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language)
|
1625
|
+
# * [Language support for
|
1626
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1578
1627
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1579
1628
|
# the request. You must make the request with credentials for the instance of the
|
1580
1629
|
# service that owns the custom model.
|
@@ -1606,8 +1655,11 @@ module IBMWatson
|
|
1606
1655
|
# being processed. You must use credentials for the instance of the service that
|
1607
1656
|
# owns a model to delete it.
|
1608
1657
|
#
|
1609
|
-
# **See also:**
|
1610
|
-
#
|
1658
|
+
# **See also:**
|
1659
|
+
# * [Deleting a custom language
|
1660
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#deleteModel-language)
|
1661
|
+
# * [Language support for
|
1662
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1611
1663
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1612
1664
|
# the request. You must make the request with credentials for the instance of the
|
1613
1665
|
# service that owns the custom model.
|
@@ -1647,15 +1699,19 @@ module IBMWatson
|
|
1647
1699
|
# the current load on the service. The method returns an HTTP 200 response code to
|
1648
1700
|
# indicate that the training process has begun.
|
1649
1701
|
#
|
1650
|
-
# You can monitor the status of the training by using the
|
1651
|
-
# model
|
1652
|
-
# seconds. The method returns a `LanguageModel` object that
|
1653
|
-
# `progress` fields. A status of `available` means that the
|
1654
|
-
# and ready to use. The service cannot accept subsequent
|
1655
|
-
# requests to add new resources until the existing request
|
1702
|
+
# You can monitor the status of the training by using the [Get a custom language
|
1703
|
+
# model](#getlanguagemodel) method to poll the model's status. Use a loop to check
|
1704
|
+
# the status every 10 seconds. The method returns a `LanguageModel` object that
|
1705
|
+
# includes `status` and `progress` fields. A status of `available` means that the
|
1706
|
+
# custom model is trained and ready to use. The service cannot accept subsequent
|
1707
|
+
# training requests or requests to add new resources until the existing request
|
1708
|
+
# completes.
|
1656
1709
|
#
|
1657
|
-
# **See also:**
|
1658
|
-
#
|
1710
|
+
# **See also:**
|
1711
|
+
# * [Train the custom language
|
1712
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#trainModel-language)
|
1713
|
+
# * [Language support for
|
1714
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support)
|
1659
1715
|
#
|
1660
1716
|
#
|
1661
1717
|
# ### Training failures
|
@@ -1672,14 +1728,18 @@ module IBMWatson
|
|
1672
1728
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1673
1729
|
# the request. You must make the request with credentials for the instance of the
|
1674
1730
|
# service that owns the custom model.
|
1675
|
-
# @param word_type_to_add [String]
|
1676
|
-
# train the model:
|
1731
|
+
# @param word_type_to_add [String] _For custom models that are based on previous-generation models_, the type of
|
1732
|
+
# words from the custom language model's words resource on which to train the model:
|
1677
1733
|
# * `all` (the default) trains the model on all new words, regardless of whether
|
1678
1734
|
# they were extracted from corpora or grammars or were added or modified by the
|
1679
1735
|
# user.
|
1680
|
-
# * `user` trains the model only on
|
1736
|
+
# * `user` trains the model only on custom words that were added or modified by the
|
1681
1737
|
# user directly. The model is not trained on new words extracted from corpora or
|
1682
1738
|
# grammars.
|
1739
|
+
#
|
1740
|
+
# _For custom models that are based on next-generation models_, the service ignores
|
1741
|
+
# the parameter. The words resource contains only custom words that the user adds or
|
1742
|
+
# modifies directly, so the parameter is unnecessary.
|
1683
1743
|
# @param customization_weight [Float] Specifies a customization weight for the custom language model. The customization
|
1684
1744
|
# weight tells the service how much weight to give to words from the custom language
|
1685
1745
|
# model compared to those from the base model for speech recognition. Specify a
|
@@ -1733,8 +1793,11 @@ module IBMWatson
|
|
1733
1793
|
# must use credentials for the instance of the service that owns a model to reset
|
1734
1794
|
# it.
|
1735
1795
|
#
|
1736
|
-
# **See also:**
|
1737
|
-
#
|
1796
|
+
# **See also:**
|
1797
|
+
# * [Resetting a custom language
|
1798
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#resetModel-language)
|
1799
|
+
# * [Language support for
|
1800
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1738
1801
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1739
1802
|
# the request. You must make the request with credentials for the instance of the
|
1740
1803
|
# service that owns the custom model.
|
@@ -1770,15 +1833,20 @@ module IBMWatson
|
|
1770
1833
|
#
|
1771
1834
|
# The method returns an HTTP 200 response code to indicate that the upgrade process
|
1772
1835
|
# has begun successfully. You can monitor the status of the upgrade by using the
|
1773
|
-
#
|
1774
|
-
# returns a `LanguageModel` object that includes `status` and
|
1775
|
-
# a loop to check the status every 10 seconds.
|
1776
|
-
#
|
1777
|
-
#
|
1778
|
-
#
|
1779
|
-
#
|
1780
|
-
#
|
1781
|
-
#
|
1836
|
+
# [Get a custom language model](#getlanguagemodel) method to poll the model's
|
1837
|
+
# status. The method returns a `LanguageModel` object that includes `status` and
|
1838
|
+
# `progress` fields. Use a loop to check the status every 10 seconds.
|
1839
|
+
#
|
1840
|
+
# While it is being upgraded, the custom model has the status `upgrading`. When the
|
1841
|
+
# upgrade is complete, the model resumes the status that it had prior to upgrade.
|
1842
|
+
# The service cannot accept subsequent requests for the model until the upgrade
|
1843
|
+
# completes.
|
1844
|
+
#
|
1845
|
+
# **See also:**
|
1846
|
+
# * [Upgrading a custom language
|
1847
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-language)
|
1848
|
+
# * [Language support for
|
1849
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
1782
1850
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1783
1851
|
# the request. You must make the request with credentials for the instance of the
|
1784
1852
|
# service that owns the custom model.
|
@@ -1809,9 +1877,10 @@ module IBMWatson
|
|
1809
1877
|
# @!method list_corpora(customization_id:)
|
1810
1878
|
# List corpora.
|
1811
1879
|
# Lists information about all corpora from a custom language model. The information
|
1812
|
-
# includes the total number of words
|
1813
|
-
#
|
1814
|
-
#
|
1880
|
+
# includes the name, status, and total number of words for each corpus. _For custom
|
1881
|
+
# models that are based on previous-generation models_, it also includes the number
|
1882
|
+
# of out-of-vocabulary (OOV) words from the corpus. You must use credentials for the
|
1883
|
+
# instance of the service that owns a model to list its corpora.
|
1815
1884
|
#
|
1816
1885
|
# **See also:** [Listing corpora for a custom language
|
1817
1886
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#listCorpora).
|
@@ -1845,51 +1914,60 @@ module IBMWatson
|
|
1845
1914
|
# Use multiple requests to submit multiple corpus text files. You must use
|
1846
1915
|
# credentials for the instance of the service that owns a model to add a corpus to
|
1847
1916
|
# it. Adding a corpus does not affect the custom language model until you train the
|
1848
|
-
# model for the new data by using the
|
1917
|
+
# model for the new data by using the [Train a custom language
|
1918
|
+
# model](#trainlanguagemodel) method.
|
1849
1919
|
#
|
1850
1920
|
# Submit a plain text file that contains sample sentences from the domain of
|
1851
|
-
# interest to enable the service to
|
1852
|
-
# add that represent the context in which speakers use words from the domain,
|
1853
|
-
# better the service's recognition accuracy.
|
1921
|
+
# interest to enable the service to parse the words in context. The more sentences
|
1922
|
+
# you add that represent the context in which speakers use words from the domain,
|
1923
|
+
# the better the service's recognition accuracy.
|
1854
1924
|
#
|
1855
1925
|
# The call returns an HTTP 201 response code if the corpus is valid. The service
|
1856
|
-
# then asynchronously processes
|
1857
|
-
#
|
1858
|
-
#
|
1859
|
-
#
|
1860
|
-
#
|
1861
|
-
#
|
1862
|
-
#
|
1863
|
-
#
|
1864
|
-
#
|
1865
|
-
#
|
1866
|
-
#
|
1867
|
-
#
|
1868
|
-
#
|
1869
|
-
#
|
1870
|
-
#
|
1926
|
+
# then asynchronously processes and automatically extracts data from the contents of
|
1927
|
+
# the corpus. This operation can take on the order of minutes to complete depending
|
1928
|
+
# on the current load on the service, the total number of words in the corpus, and,
|
1929
|
+
# _for custom models that are based on previous-generation models_, the number of
|
1930
|
+
# new (out-of-vocabulary) words in the corpus. You cannot submit requests to add
|
1931
|
+
# additional resources to the custom model or to train the model until the service's
|
1932
|
+
# analysis of the corpus for the current request completes. Use the [Get a
|
1933
|
+
# corpus](#getcorpus) method to check the status of the analysis.
|
1934
|
+
#
|
1935
|
+
# _For custom models that are based on previous-generation models_, the service
|
1936
|
+
# auto-populates the model's words resource with words from the corpus that are not
|
1937
|
+
# found in its base vocabulary. These words are referred to as out-of-vocabulary
|
1938
|
+
# (OOV) words. After adding a corpus, you must validate the words resource to ensure
|
1939
|
+
# that each OOV word's definition is complete and valid. You can use the [List
|
1940
|
+
# custom words](#listwords) method to examine the words resource. You can use other
|
1941
|
+
# words method to eliminate typos and modify how words are pronounced as needed.
|
1871
1942
|
#
|
1872
1943
|
# To add a corpus file that has the same name as an existing corpus, set the
|
1873
1944
|
# `allow_overwrite` parameter to `true`; otherwise, the request fails. Overwriting
|
1874
1945
|
# an existing corpus causes the service to process the corpus text file and extract
|
1875
|
-
#
|
1876
|
-
#
|
1877
|
-
#
|
1878
|
-
#
|
1946
|
+
# its data anew. _For a custom model that is based on a previous-generation model_,
|
1947
|
+
# the service first removes any OOV words that are associated with the existing
|
1948
|
+
# corpus from the model's words resource unless they were also added by another
|
1949
|
+
# corpus or grammar, or they have been modified in some way with the [Add custom
|
1950
|
+
# words](#addwords) or [Add a custom word](#addword) method.
|
1879
1951
|
#
|
1880
1952
|
# The service limits the overall amount of data that you can add to a custom model
|
1881
|
-
# to a maximum of 10 million total words from all sources combined.
|
1882
|
-
#
|
1883
|
-
#
|
1884
|
-
# directly.
|
1953
|
+
# to a maximum of 10 million total words from all sources combined. _For a custom
|
1954
|
+
# model that is based on a previous-generation model_, you can add no more than 90
|
1955
|
+
# thousand custom (OOV) words to a model. This includes words that the service
|
1956
|
+
# extracts from corpora and grammars, and words that you add directly.
|
1885
1957
|
#
|
1886
1958
|
# **See also:**
|
1887
1959
|
# * [Add a corpus to the custom language
|
1888
1960
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addCorpus)
|
1889
|
-
# * [Working with
|
1890
|
-
#
|
1891
|
-
# * [
|
1892
|
-
#
|
1961
|
+
# * [Working with corpora for previous-generation
|
1962
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingCorpora)
|
1963
|
+
# * [Working with corpora for next-generation
|
1964
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingCorpora-ng)
|
1965
|
+
#
|
1966
|
+
# * [Validating a words resource for previous-generation
|
1967
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
1968
|
+
#
|
1969
|
+
# * [Validating a words resource for next-generation
|
1970
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
1893
1971
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1894
1972
|
# the request. You must make the request with credentials for the instance of the
|
1895
1973
|
# service that owns the custom model.
|
@@ -1912,10 +1990,10 @@ module IBMWatson
|
|
1912
1990
|
# in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 encoding
|
1913
1991
|
# if it encounters non-ASCII characters.
|
1914
1992
|
#
|
1915
|
-
# Make sure that you know the character encoding of the file. You must use that
|
1993
|
+
# Make sure that you know the character encoding of the file. You must use that same
|
1916
1994
|
# encoding when working with the words in the custom language model. For more
|
1917
|
-
# information, see [Character
|
1918
|
-
#
|
1995
|
+
# information, see [Character encoding for custom
|
1996
|
+
# words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWords#charEncoding).
|
1919
1997
|
#
|
1920
1998
|
#
|
1921
1999
|
# With the `curl` command, use the `--data-binary` option to upload the file for the
|
@@ -1964,9 +2042,10 @@ module IBMWatson
|
|
1964
2042
|
# @!method get_corpus(customization_id:, corpus_name:)
|
1965
2043
|
# Get a corpus.
|
1966
2044
|
# Gets information about a corpus from a custom language model. The information
|
1967
|
-
# includes the total number of words
|
1968
|
-
#
|
1969
|
-
#
|
2045
|
+
# includes the name, status, and total number of words for the corpus. _For custom
|
2046
|
+
# models that are based on previous-generation models_, it also includes the number
|
2047
|
+
# of out-of-vocabulary (OOV) words from the corpus. You must use credentials for the
|
2048
|
+
# instance of the service that owns a model to list its corpora.
|
1970
2049
|
#
|
1971
2050
|
# **See also:** [Listing corpora for a custom language
|
1972
2051
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#listCorpora).
|
@@ -1999,14 +2078,18 @@ module IBMWatson
|
|
1999
2078
|
##
|
2000
2079
|
# @!method delete_corpus(customization_id:, corpus_name:)
|
2001
2080
|
# Delete a corpus.
|
2002
|
-
# Deletes an existing corpus from a custom language model.
|
2003
|
-
#
|
2004
|
-
# model
|
2005
|
-
#
|
2006
|
-
#
|
2007
|
-
#
|
2008
|
-
#
|
2009
|
-
#
|
2081
|
+
# Deletes an existing corpus from a custom language model. Removing a corpus does
|
2082
|
+
# not affect the custom model until you train the model with the [Train a custom
|
2083
|
+
# language model](#trainlanguagemodel) method. You must use credentials for the
|
2084
|
+
# instance of the service that owns a model to delete its corpora.
|
2085
|
+
#
|
2086
|
+
# _For custom models that are based on previous-generation models_, the service
|
2087
|
+
# removes any out-of-vocabulary (OOV) words that are associated with the corpus from
|
2088
|
+
# the custom model's words resource unless they were also added by another corpus or
|
2089
|
+
# grammar, or they were modified in some way with the [Add custom words](#addwords)
|
2090
|
+
# or [Add a custom word](#addword) method.
|
2091
|
+
#
|
2092
|
+
#
|
2010
2093
|
#
|
2011
2094
|
# **See also:** [Deleting a corpus from a custom language
|
2012
2095
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#deleteCorpus).
|
@@ -2044,10 +2127,11 @@ module IBMWatson
|
|
2044
2127
|
# List custom words.
|
2045
2128
|
# Lists information about custom words from a custom language model. You can list
|
2046
2129
|
# all words from the custom model's words resource, only custom words that were
|
2047
|
-
# added or modified by the user, or
|
2048
|
-
#
|
2049
|
-
#
|
2050
|
-
#
|
2130
|
+
# added or modified by the user, or, _for a custom model that is based on a
|
2131
|
+
# previous-generation model_, only out-of-vocabulary (OOV) words that were extracted
|
2132
|
+
# from corpora or are recognized by grammars. You can also indicate the order in
|
2133
|
+
# which the service is to return words; by default, the service lists words in
|
2134
|
+
# ascending alphabetical order. You must use credentials for the instance of the
|
2051
2135
|
# service that owns a model to list information about its words.
|
2052
2136
|
#
|
2053
2137
|
# **See also:** [Listing words from a custom language
|
@@ -2060,6 +2144,10 @@ module IBMWatson
|
|
2060
2144
|
# * `user` shows only custom words that were added or modified by the user directly.
|
2061
2145
|
# * `corpora` shows only OOV that were extracted from corpora.
|
2062
2146
|
# * `grammars` shows only OOV words that are recognized by grammars.
|
2147
|
+
#
|
2148
|
+
# _For a custom model that is based on a next-generation model_, only `all` and
|
2149
|
+
# `user` apply. Both options return the same results. Words from other sources are
|
2150
|
+
# not added to custom models that are based on next-generation models.
|
2063
2151
|
# @param sort [String] Indicates the order in which the words are to be listed, `alphabetical` or by
|
2064
2152
|
# `count`. You can prepend an optional `+` or `-` to an argument to indicate whether
|
2065
2153
|
# the results are to be sorted in ascending or descending order. By default, words
|
@@ -2096,10 +2184,14 @@ module IBMWatson
|
|
2096
2184
|
##
|
2097
2185
|
# @!method add_words(customization_id:, words:)
|
2098
2186
|
# Add custom words.
|
2099
|
-
# Adds one or more custom words to a custom language model.
|
2187
|
+
# Adds one or more custom words to a custom language model. You can use this method
|
2188
|
+
# to add words or to modify existing words in a custom model's words resource. _For
|
2189
|
+
# custom models that are based on previous-generation models_, the service populates
|
2100
2190
|
# the words resource for a custom model with out-of-vocabulary (OOV) words from each
|
2101
|
-
# corpus or grammar that is added to the model. You can use this method to
|
2102
|
-
#
|
2191
|
+
# corpus or grammar that is added to the model. You can use this method to modify
|
2192
|
+
# OOV words in the model's words resource.
|
2193
|
+
#
|
2194
|
+
# _For a custom model that is based on a previous-generation model_, the words
|
2103
2195
|
# resource for a model can contain a maximum of 90 thousand custom (OOV) words. This
|
2104
2196
|
# includes words that the service extracts from corpora and grammars and words that
|
2105
2197
|
# you add directly.
|
@@ -2107,25 +2199,26 @@ module IBMWatson
|
|
2107
2199
|
# You must use credentials for the instance of the service that owns a model to add
|
2108
2200
|
# or modify custom words for the model. Adding or modifying custom words does not
|
2109
2201
|
# affect the custom model until you train the model for the new data by using the
|
2110
|
-
#
|
2202
|
+
# [Train a custom language model](#trainlanguagemodel) method.
|
2111
2203
|
#
|
2112
2204
|
# You add custom words by providing a `CustomWords` object, which is an array of
|
2113
|
-
# `CustomWord` objects, one per word.
|
2114
|
-
#
|
2115
|
-
#
|
2116
|
-
# * The `sounds_like` field provides an array of one or more pronunciations for the
|
2117
|
-
# word. Use the parameter to specify how the word can be pronounced by users. Use
|
2118
|
-
# the parameter for words that are difficult to pronounce, foreign words, acronyms,
|
2119
|
-
# and so on. For example, you might specify that the word `IEEE` can sound like `i
|
2120
|
-
# triple e`. You can specify a maximum of five sounds-like pronunciations for a
|
2121
|
-
# word. If you omit the `sounds_like` field, the service attempts to set the field
|
2122
|
-
# to its pronunciation of the word. It cannot generate a pronunciation for all
|
2123
|
-
# words, so you must review the word's definition to ensure that it is complete and
|
2124
|
-
# valid.
|
2205
|
+
# `CustomWord` objects, one per word. Use the object's `word` parameter to identify
|
2206
|
+
# the word that is to be added. You can also provide one or both of the optional
|
2207
|
+
# `display_as` or `sounds_like` fields for each word.
|
2125
2208
|
# * The `display_as` field provides a different way of spelling the word in a
|
2126
2209
|
# transcript. Use the parameter when you want the word to appear different from its
|
2127
2210
|
# usual representation or from its spelling in training data. For example, you might
|
2128
|
-
# indicate that the word `IBM
|
2211
|
+
# indicate that the word `IBM` is to be displayed as `IBM™`.
|
2212
|
+
# * The `sounds_like` field, _which can be used only with a custom model that is
|
2213
|
+
# based on a previous-generation model_, provides an array of one or more
|
2214
|
+
# pronunciations for the word. Use the parameter to specify how the word can be
|
2215
|
+
# pronounced by users. Use the parameter for words that are difficult to pronounce,
|
2216
|
+
# foreign words, acronyms, and so on. For example, you might specify that the word
|
2217
|
+
# `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like
|
2218
|
+
# pronunciations for a word. If you omit the `sounds_like` field, the service
|
2219
|
+
# attempts to set the field to its pronunciation of the word. It cannot generate a
|
2220
|
+
# pronunciation for all words, so you must review the word's definition to ensure
|
2221
|
+
# that it is complete and valid.
|
2129
2222
|
#
|
2130
2223
|
# If you add a custom word that already exists in the words resource for the custom
|
2131
2224
|
# model, the new definition overwrites the existing data for the word. If the
|
@@ -2137,26 +2230,30 @@ module IBMWatson
|
|
2137
2230
|
# time that it takes for the analysis to complete depends on the number of new words
|
2138
2231
|
# that you add but is generally faster than adding a corpus or grammar.
|
2139
2232
|
#
|
2140
|
-
# You can monitor the status of the request by using the
|
2141
|
-
# model
|
2142
|
-
# seconds. The method returns a `Customization` object that
|
2143
|
-
# field. A status of `ready` means that the words have been
|
2144
|
-
# model. The service cannot accept requests to add new data or
|
2145
|
-
# until the existing request completes.
|
2146
|
-
#
|
2147
|
-
# You can use the **List custom words** or **List a custom word** method to review
|
2148
|
-
# the words that you add. Words with an invalid `sounds_like` field include an
|
2149
|
-
# `error` field that describes the problem. You can use other words-related methods
|
2150
|
-
# to correct errors, eliminate typos, and modify how words are pronounced as needed.
|
2233
|
+
# You can monitor the status of the request by using the [Get a custom language
|
2234
|
+
# model](#getlanguagemodel) method to poll the model's status. Use a loop to check
|
2235
|
+
# the status every 10 seconds. The method returns a `Customization` object that
|
2236
|
+
# includes a `status` field. A status of `ready` means that the words have been
|
2237
|
+
# added to the custom model. The service cannot accept requests to add new data or
|
2238
|
+
# to train the model until the existing request completes.
|
2151
2239
|
#
|
2240
|
+
# You can use the [List custom words](#listwords) or [Get a custom word](#getword)
|
2241
|
+
# method to review the words that you add. Words with an invalid `sounds_like` field
|
2242
|
+
# include an `error` field that describes the problem. You can use other
|
2243
|
+
# words-related methods to correct errors, eliminate typos, and modify how words are
|
2244
|
+
# pronounced as needed.
|
2152
2245
|
#
|
2153
2246
|
# **See also:**
|
2154
2247
|
# * [Add words to the custom language
|
2155
2248
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addWords)
|
2156
|
-
# * [Working with custom
|
2157
|
-
#
|
2158
|
-
# * [
|
2159
|
-
#
|
2249
|
+
# * [Working with custom words for previous-generation
|
2250
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingWords)
|
2251
|
+
# * [Working with custom words for next-generation
|
2252
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingWords-ng)
|
2253
|
+
# * [Validating a words resource for previous-generation
|
2254
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
2255
|
+
# * [Validating a words resource for next-generation
|
2256
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
2160
2257
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2161
2258
|
# the request. You must make the request with credentials for the instance of the
|
2162
2259
|
# service that owns the custom model.
|
@@ -2192,47 +2289,57 @@ module IBMWatson
|
|
2192
2289
|
##
|
2193
2290
|
# @!method add_word(customization_id:, word_name:, word: nil, sounds_like: nil, display_as: nil)
|
2194
2291
|
# Add a custom word.
|
2195
|
-
# Adds a custom word to a custom language model.
|
2196
|
-
#
|
2197
|
-
#
|
2198
|
-
#
|
2199
|
-
#
|
2200
|
-
#
|
2292
|
+
# Adds a custom word to a custom language model. You can use this method to add a
|
2293
|
+
# word or to modify an existing word in the words resource. _For custom models that
|
2294
|
+
# are based on previous-generation models_, the service populates the words resource
|
2295
|
+
# for a custom model with out-of-vocabulary (OOV) words from each corpus or grammar
|
2296
|
+
# that is added to the model. You can use this method to modify OOV words in the
|
2297
|
+
# model's words resource.
|
2298
|
+
#
|
2299
|
+
# _For a custom model that is based on a previous-generation models_, the words
|
2300
|
+
# resource for a model can contain a maximum of 90 thousand custom (OOV) words. This
|
2301
|
+
# includes words that the service extracts from corpora and grammars and words that
|
2302
|
+
# you add directly.
|
2201
2303
|
#
|
2202
2304
|
# You must use credentials for the instance of the service that owns a model to add
|
2203
2305
|
# or modify a custom word for the model. Adding or modifying a custom word does not
|
2204
2306
|
# affect the custom model until you train the model for the new data by using the
|
2205
|
-
#
|
2307
|
+
# [Train a custom language model](#trainlanguagemodel) method.
|
2206
2308
|
#
|
2207
2309
|
# Use the `word_name` parameter to specify the custom word that is to be added or
|
2208
2310
|
# modified. Use the `CustomWord` object to provide one or both of the optional
|
2209
|
-
# `
|
2210
|
-
# * The `sounds_like` field provides an array of one or more pronunciations for the
|
2211
|
-
# word. Use the parameter to specify how the word can be pronounced by users. Use
|
2212
|
-
# the parameter for words that are difficult to pronounce, foreign words, acronyms,
|
2213
|
-
# and so on. For example, you might specify that the word `IEEE` can sound like `i
|
2214
|
-
# triple e`. You can specify a maximum of five sounds-like pronunciations for a
|
2215
|
-
# word. If you omit the `sounds_like` field, the service attempts to set the field
|
2216
|
-
# to its pronunciation of the word. It cannot generate a pronunciation for all
|
2217
|
-
# words, so you must review the word's definition to ensure that it is complete and
|
2218
|
-
# valid.
|
2311
|
+
# `display_as` or `sounds_like` fields for the word.
|
2219
2312
|
# * The `display_as` field provides a different way of spelling the word in a
|
2220
2313
|
# transcript. Use the parameter when you want the word to appear different from its
|
2221
2314
|
# usual representation or from its spelling in training data. For example, you might
|
2222
|
-
# indicate that the word `IBM
|
2315
|
+
# indicate that the word `IBM` is to be displayed as `IBM™`.
|
2316
|
+
# * The `sounds_like` field, _which can be used only with a custom model that is
|
2317
|
+
# based on a previous-generation model_, provides an array of one or more
|
2318
|
+
# pronunciations for the word. Use the parameter to specify how the word can be
|
2319
|
+
# pronounced by users. Use the parameter for words that are difficult to pronounce,
|
2320
|
+
# foreign words, acronyms, and so on. For example, you might specify that the word
|
2321
|
+
# `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like
|
2322
|
+
# pronunciations for a word. If you omit the `sounds_like` field, the service
|
2323
|
+
# attempts to set the field to its pronunciation of the word. It cannot generate a
|
2324
|
+
# pronunciation for all words, so you must review the word's definition to ensure
|
2325
|
+
# that it is complete and valid.
|
2223
2326
|
#
|
2224
2327
|
# If you add a custom word that already exists in the words resource for the custom
|
2225
2328
|
# model, the new definition overwrites the existing data for the word. If the
|
2226
2329
|
# service encounters an error, it does not add the word to the words resource. Use
|
2227
|
-
# the
|
2330
|
+
# the [Get a custom word](#getword) method to review the word that you add.
|
2228
2331
|
#
|
2229
2332
|
# **See also:**
|
2230
2333
|
# * [Add words to the custom language
|
2231
2334
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addWords)
|
2232
|
-
# * [Working with custom
|
2233
|
-
#
|
2234
|
-
# * [
|
2235
|
-
#
|
2335
|
+
# * [Working with custom words for previous-generation
|
2336
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingWords)
|
2337
|
+
# * [Working with custom words for next-generation
|
2338
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingWords-ng)
|
2339
|
+
# * [Validating a words resource for previous-generation
|
2340
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
2341
|
+
# * [Validating a words resource for next-generation
|
2342
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
2236
2343
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2237
2344
|
# the request. You must make the request with credentials for the instance of the
|
2238
2345
|
# service that owns the custom model.
|
@@ -2241,14 +2348,16 @@ module IBMWatson
|
|
2241
2348
|
# the tokens of compound words. URL-encode the word if it includes non-ASCII
|
2242
2349
|
# characters. For more information, see [Character
|
2243
2350
|
# encoding](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#charEncoding).
|
2244
|
-
# @param word [String] For the
|
2245
|
-
# be added to or updated in the custom model. Do not include spaces in
|
2246
|
-
# a `-` (dash) or `_` (underscore) to connect the tokens of compound
|
2247
|
-
#
|
2248
|
-
#
|
2249
|
-
#
|
2250
|
-
#
|
2251
|
-
#
|
2351
|
+
# @param word [String] For the [Add custom words](#addwords) method, you must specify the custom word
|
2352
|
+
# that is to be added to or updated in the custom model. Do not include spaces in
|
2353
|
+
# the word. Use a `-` (dash) or `_` (underscore) to connect the tokens of compound
|
2354
|
+
# words.
|
2355
|
+
#
|
2356
|
+
# Omit this parameter for the [Add a custom word](#addword) method.
|
2357
|
+
# @param sounds_like [Array[String]] _For a custom model that is based on a previous-generation model_, an array of
|
2358
|
+
# sounds-like pronunciations for the custom word. Specify how words that are
|
2359
|
+
# difficult to pronounce, foreign words, acronyms, and so on can be pronounced by
|
2360
|
+
# users.
|
2252
2361
|
# * For a word that is not in the service's base vocabulary, omit the parameter to
|
2253
2362
|
# have the service automatically generate a sounds-like pronunciation for the word.
|
2254
2363
|
# * For a word that is in the service's base vocabulary, use the parameter to
|
@@ -2258,6 +2367,10 @@ module IBMWatson
|
|
2258
2367
|
#
|
2259
2368
|
# A word can have at most five sounds-like pronunciations. A pronunciation can
|
2260
2369
|
# include at most 40 characters not including spaces.
|
2370
|
+
#
|
2371
|
+
# _For a custom model that is based on a next-generation model_, omit this field.
|
2372
|
+
# Custom models based on next-generation models do not support the `sounds_like`
|
2373
|
+
# field. The service ignores the field.
|
2261
2374
|
# @param display_as [String] An alternative spelling for the custom word when it appears in a transcript. Use
|
2262
2375
|
# the parameter when you want the word to have a spelling that is different from its
|
2263
2376
|
# usual representation or from its spelling in corpora training data.
|
@@ -2332,11 +2445,12 @@ module IBMWatson
|
|
2332
2445
|
# Delete a custom word.
|
2333
2446
|
# Deletes a custom word from a custom language model. You can remove any word that
|
2334
2447
|
# you added to the custom model's words resource via any means. However, if the word
|
2335
|
-
# also exists in the service's base vocabulary, the service removes
|
2336
|
-
#
|
2448
|
+
# also exists in the service's base vocabulary, the service removes the word only
|
2449
|
+
# from the words resource; the word remains in the base vocabulary. Removing a
|
2337
2450
|
# custom word does not affect the custom model until you train the model with the
|
2338
|
-
#
|
2339
|
-
# instance of the service that owns a model to delete its words.
|
2451
|
+
# [Train a custom language model](#trainlanguagemodel) method. You must use
|
2452
|
+
# credentials for the instance of the service that owns a model to delete its words.
|
2453
|
+
#
|
2340
2454
|
#
|
2341
2455
|
# **See also:** [Deleting a word from a custom language
|
2342
2456
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWords#deleteWord).
|
@@ -2374,13 +2488,17 @@ module IBMWatson
|
|
2374
2488
|
##
|
2375
2489
|
# @!method list_grammars(customization_id:)
|
2376
2490
|
# List grammars.
|
2377
|
-
# Lists information about all grammars from a custom language model.
|
2378
|
-
#
|
2379
|
-
#
|
2380
|
-
#
|
2491
|
+
# Lists information about all grammars from a custom language model. For each
|
2492
|
+
# grammar, the information includes the name, status, and (for grammars that are
|
2493
|
+
# based on previous-generation models) the total number of out-of-vocabulary (OOV)
|
2494
|
+
# words. You must use credentials for the instance of the service that owns a model
|
2495
|
+
# to list its grammars.
|
2381
2496
|
#
|
2382
|
-
# **See also:**
|
2383
|
-
#
|
2497
|
+
# **See also:**
|
2498
|
+
# * [Listing grammars from a custom language
|
2499
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars)
|
2500
|
+
# * [Language support for
|
2501
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2384
2502
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2385
2503
|
# the request. You must make the request with credentials for the instance of the
|
2386
2504
|
# service that owns the custom model.
|
@@ -2411,8 +2529,8 @@ module IBMWatson
|
|
2411
2529
|
# UTF-8 format that defines the grammar. Use multiple requests to submit multiple
|
2412
2530
|
# grammar files. You must use credentials for the instance of the service that owns
|
2413
2531
|
# a model to add a grammar to it. Adding a grammar does not affect the custom
|
2414
|
-
# language model until you train the model for the new data by using the
|
2415
|
-
# custom language model
|
2532
|
+
# language model until you train the model for the new data by using the [Train a
|
2533
|
+
# custom language model](#trainlanguagemodel) method.
|
2416
2534
|
#
|
2417
2535
|
# The call returns an HTTP 201 response code if the grammar is valid. The service
|
2418
2536
|
# then asynchronously processes the contents of the grammar and automatically
|
@@ -2420,33 +2538,39 @@ module IBMWatson
|
|
2420
2538
|
# to complete depending on the size and complexity of the grammar, as well as the
|
2421
2539
|
# current load on the service. You cannot submit requests to add additional
|
2422
2540
|
# resources to the custom model or to train the model until the service's analysis
|
2423
|
-
# of the grammar for the current request completes. Use the
|
2424
|
-
# to check the status of the analysis.
|
2425
|
-
#
|
2426
|
-
#
|
2427
|
-
#
|
2428
|
-
#
|
2429
|
-
# words
|
2430
|
-
# to
|
2541
|
+
# of the grammar for the current request completes. Use the [Get a
|
2542
|
+
# grammar](#getgrammar) method to check the status of the analysis.
|
2543
|
+
#
|
2544
|
+
# _For grammars that are based on previous-generation models,_ the service populates
|
2545
|
+
# the model's words resource with any word that is recognized by the grammar that is
|
2546
|
+
# not found in the model's base vocabulary. These are referred to as
|
2547
|
+
# out-of-vocabulary (OOV) words. You can use the [List custom words](#listwords)
|
2548
|
+
# method to examine the words resource and use other words-related methods to
|
2549
|
+
# eliminate typos and modify how words are pronounced as needed. _For grammars that
|
2550
|
+
# are based on next-generation models,_ the service extracts no OOV words from the
|
2551
|
+
# grammars.
|
2431
2552
|
#
|
2432
2553
|
# To add a grammar that has the same name as an existing grammar, set the
|
2433
2554
|
# `allow_overwrite` parameter to `true`; otherwise, the request fails. Overwriting
|
2434
2555
|
# an existing grammar causes the service to process the grammar file and extract OOV
|
2435
2556
|
# words anew. Before doing so, it removes any OOV words associated with the existing
|
2436
2557
|
# grammar from the model's words resource unless they were also added by another
|
2437
|
-
# resource or they have been modified in some way with the
|
2438
|
-
#
|
2558
|
+
# resource or they have been modified in some way with the [Add custom
|
2559
|
+
# words](#addwords) or [Add a custom word](#addword) method.
|
2439
2560
|
#
|
2440
|
-
#
|
2441
|
-
#
|
2442
|
-
#
|
2443
|
-
#
|
2561
|
+
# _For grammars that are based on previous-generation models,_ the service limits
|
2562
|
+
# the overall amount of data that you can add to a custom model to a maximum of 10
|
2563
|
+
# million total words from all sources combined. Also, you can add no more than 90
|
2564
|
+
# thousand OOV words to a model. This includes words that the service extracts from
|
2565
|
+
# corpora and grammars and words that you add directly.
|
2444
2566
|
#
|
2445
2567
|
# **See also:**
|
2446
2568
|
# * [Understanding
|
2447
2569
|
# grammars](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUnderstand#grammarUnderstand)
|
2448
2570
|
# * [Add a grammar to the custom language
|
2449
|
-
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAdd#addGrammar)
|
2571
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAdd#addGrammar)
|
2572
|
+
# * [Language support for
|
2573
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2450
2574
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2451
2575
|
# the request. You must make the request with credentials for the instance of the
|
2452
2576
|
# service that owns the custom model.
|
@@ -2465,7 +2589,7 @@ module IBMWatson
|
|
2465
2589
|
# words that are added or modified by the user.
|
2466
2590
|
# * Do not use the name `base_lm` or `default_lm`. Both names are reserved for
|
2467
2591
|
# future use by the service.
|
2468
|
-
# @param grammar_file [
|
2592
|
+
# @param grammar_file [File] A plain text file that contains the grammar in the format specified by the
|
2469
2593
|
# `Content-Type` header. Encode the file in UTF-8 (ASCII is a subset of UTF-8).
|
2470
2594
|
# Using any other encoding can lead to issues when compiling the grammar or to
|
2471
2595
|
# unexpected results in decoding. The service ignores an encoding that is specified
|
@@ -2520,13 +2644,17 @@ module IBMWatson
|
|
2520
2644
|
##
|
2521
2645
|
# @!method get_grammar(customization_id:, grammar_name:)
|
2522
2646
|
# Get a grammar.
|
2523
|
-
# Gets information about a grammar from a custom language model.
|
2524
|
-
# includes the
|
2525
|
-
#
|
2526
|
-
# model to list its
|
2647
|
+
# Gets information about a grammar from a custom language model. For each grammar,
|
2648
|
+
# the information includes the name, status, and (for grammars that are based on
|
2649
|
+
# previous-generation models) the total number of out-of-vocabulary (OOV) words. You
|
2650
|
+
# must use credentials for the instance of the service that owns a model to list its
|
2651
|
+
# grammars.
|
2527
2652
|
#
|
2528
|
-
# **See also:**
|
2529
|
-
#
|
2653
|
+
# **See also:**
|
2654
|
+
# * [Listing grammars from a custom language
|
2655
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars)
|
2656
|
+
# * [Language support for
|
2657
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2530
2658
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2531
2659
|
# the request. You must make the request with credentials for the instance of the
|
2532
2660
|
# service that owns the custom model.
|
@@ -2556,16 +2684,21 @@ module IBMWatson
|
|
2556
2684
|
##
|
2557
2685
|
# @!method delete_grammar(customization_id:, grammar_name:)
|
2558
2686
|
# Delete a grammar.
|
2559
|
-
# Deletes an existing grammar from a custom language model.
|
2560
|
-
#
|
2561
|
-
# words
|
2562
|
-
#
|
2563
|
-
#
|
2564
|
-
#
|
2565
|
-
#
|
2566
|
-
#
|
2567
|
-
#
|
2568
|
-
#
|
2687
|
+
# Deletes an existing grammar from a custom language model. _For grammars that are
|
2688
|
+
# based on previous-generation models,_ the service removes any out-of-vocabulary
|
2689
|
+
# (OOV) words associated with the grammar from the custom model's words resource
|
2690
|
+
# unless they were also added by another resource or they were modified in some way
|
2691
|
+
# with the [Add custom words](#addwords) or [Add a custom word](#addword) method.
|
2692
|
+
# Removing a grammar does not affect the custom model until you train the model with
|
2693
|
+
# the [Train a custom language model](#trainlanguagemodel) method. You must use
|
2694
|
+
# credentials for the instance of the service that owns a model to delete its
|
2695
|
+
# grammar.
|
2696
|
+
#
|
2697
|
+
# **See also:**
|
2698
|
+
# * [Deleting a grammar from a custom language
|
2699
|
+
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#deleteGrammar)
|
2700
|
+
# * [Language support for
|
2701
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2569
2702
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2570
2703
|
# the request. You must make the request with credentials for the instance of the
|
2571
2704
|
# service that owns the custom model.
|
@@ -2608,6 +2741,18 @@ module IBMWatson
|
|
2608
2741
|
# do not lose any models, but you cannot create any more until your model count is
|
2609
2742
|
# below the limit.
|
2610
2743
|
#
|
2744
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2745
|
+
# previous-generation models. It is not supported for next-generation models.
|
2746
|
+
#
|
2747
|
+
# **Important:** Effective 15 March 2022, previous-generation models for all
|
2748
|
+
# languages other than Arabic and Japanese are deprecated. The deprecated models
|
2749
|
+
# remain available until 15 September 2022, when they will be removed from the
|
2750
|
+
# service and the documentation. You must migrate to the equivalent next-generation
|
2751
|
+
# model by the end of service date. For more information, see [Migrating to
|
2752
|
+
# next-generation
|
2753
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
|
2754
|
+
#
|
2755
|
+
#
|
2611
2756
|
# **See also:** [Create a custom acoustic
|
2612
2757
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#createModel-acoustic).
|
2613
2758
|
# @param name [String] A user-defined name for the new custom acoustic model. Use a name that is unique
|
@@ -2622,7 +2767,7 @@ module IBMWatson
|
|
2622
2767
|
#
|
2623
2768
|
# To determine whether a base model supports acoustic model customization, refer to
|
2624
2769
|
# [Language support for
|
2625
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
2770
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2626
2771
|
# @param description [String] A description of the new custom acoustic model. Use a localized description that
|
2627
2772
|
# matches the language of the custom model.
|
2628
2773
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2663,16 +2808,21 @@ module IBMWatson
|
|
2663
2808
|
# all languages. You must use credentials for the instance of the service that owns
|
2664
2809
|
# a model to list information about it.
|
2665
2810
|
#
|
2811
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2812
|
+
# previous-generation models. It is not supported for next-generation models.
|
2813
|
+
#
|
2666
2814
|
# **See also:** [Listing custom acoustic
|
2667
2815
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#listModels-acoustic).
|
2668
2816
|
# @param language [String] The identifier of the language for which custom language or custom acoustic models
|
2669
|
-
# are to be returned.
|
2670
|
-
#
|
2671
|
-
#
|
2817
|
+
# are to be returned. Specify the five-character language identifier; for example,
|
2818
|
+
# specify `en-US` to see all custom language or custom acoustic models that are
|
2819
|
+
# based on US English models. Omit the parameter to see all custom language or
|
2820
|
+
# custom acoustic models that are owned by the requesting credentials. (**Note:**
|
2821
|
+
# The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
|
2672
2822
|
#
|
2673
2823
|
# To determine the languages for which customization is available, see [Language
|
2674
2824
|
# support for
|
2675
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
2825
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support).
|
2676
2826
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2677
2827
|
def list_acoustic_models(language: nil)
|
2678
2828
|
headers = {
|
@@ -2702,6 +2852,9 @@ module IBMWatson
|
|
2702
2852
|
# Gets information about a specified custom acoustic model. You must use credentials
|
2703
2853
|
# for the instance of the service that owns a model to list information about it.
|
2704
2854
|
#
|
2855
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2856
|
+
# previous-generation models. It is not supported for next-generation models.
|
2857
|
+
#
|
2705
2858
|
# **See also:** [Listing custom acoustic
|
2706
2859
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#listModels-acoustic).
|
2707
2860
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2735,6 +2888,9 @@ module IBMWatson
|
|
2735
2888
|
# processed. You must use credentials for the instance of the service that owns a
|
2736
2889
|
# model to delete it.
|
2737
2890
|
#
|
2891
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2892
|
+
# previous-generation models. It is not supported for next-generation models.
|
2893
|
+
#
|
2738
2894
|
# **See also:** [Deleting a custom acoustic
|
2739
2895
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#deleteModel-acoustic).
|
2740
2896
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2779,14 +2935,14 @@ module IBMWatson
|
|
2779
2935
|
# audio. The method returns an HTTP 200 response code to indicate that the training
|
2780
2936
|
# process has begun.
|
2781
2937
|
#
|
2782
|
-
# You can monitor the status of the training by using the
|
2783
|
-
# model
|
2784
|
-
# minute. The method returns an `AcousticModel` object that
|
2785
|
-
# `progress` fields. A status of `available` indicates that
|
2786
|
-
# trained and ready to use. The service cannot train a model
|
2787
|
-
# another request for the model. The service cannot accept
|
2788
|
-
# requests, or requests to add new audio resources, until the
|
2789
|
-
# request completes.
|
2938
|
+
# You can monitor the status of the training by using the [Get a custom acoustic
|
2939
|
+
# model](#getacousticmodel) method to poll the model's status. Use a loop to check
|
2940
|
+
# the status once a minute. The method returns an `AcousticModel` object that
|
2941
|
+
# includes `status` and `progress` fields. A status of `available` indicates that
|
2942
|
+
# the custom model is trained and ready to use. The service cannot train a model
|
2943
|
+
# while it is handling another request for the model. The service cannot accept
|
2944
|
+
# subsequent training requests, or requests to add new audio resources, until the
|
2945
|
+
# existing training request completes.
|
2790
2946
|
#
|
2791
2947
|
# You can use the optional `custom_language_model_id` parameter to specify the GUID
|
2792
2948
|
# of a separately created custom language model that is to be used during training.
|
@@ -2797,6 +2953,9 @@ module IBMWatson
|
|
2797
2953
|
# same version of the same base model, and the custom language model must be fully
|
2798
2954
|
# trained and available.
|
2799
2955
|
#
|
2956
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2957
|
+
# previous-generation models. It is not supported for next-generation models.
|
2958
|
+
#
|
2800
2959
|
# **See also:**
|
2801
2960
|
# * [Train the custom acoustic
|
2802
2961
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#trainModel-acoustic)
|
@@ -2868,6 +3027,9 @@ module IBMWatson
|
|
2868
3027
|
# request completes. You must use credentials for the instance of the service that
|
2869
3028
|
# owns a model to reset it.
|
2870
3029
|
#
|
3030
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3031
|
+
# previous-generation models. It is not supported for next-generation models.
|
3032
|
+
#
|
2871
3033
|
# **See also:** [Resetting a custom acoustic
|
2872
3034
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#resetModel-acoustic).
|
2873
3035
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2906,14 +3068,15 @@ module IBMWatson
|
|
2906
3068
|
#
|
2907
3069
|
# The method returns an HTTP 200 response code to indicate that the upgrade process
|
2908
3070
|
# has begun successfully. You can monitor the status of the upgrade by using the
|
2909
|
-
#
|
2910
|
-
# returns an `AcousticModel` object that includes `status` and
|
2911
|
-
# Use a loop to check the status once a minute.
|
2912
|
-
#
|
2913
|
-
#
|
2914
|
-
#
|
2915
|
-
#
|
2916
|
-
#
|
3071
|
+
# [Get a custom acoustic model](#getacousticmodel) method to poll the model's
|
3072
|
+
# status. The method returns an `AcousticModel` object that includes `status` and
|
3073
|
+
# `progress` fields. Use a loop to check the status once a minute.
|
3074
|
+
#
|
3075
|
+
# While it is being upgraded, the custom model has the status `upgrading`. When the
|
3076
|
+
# upgrade is complete, the model resumes the status that it had prior to upgrade.
|
3077
|
+
# The service cannot upgrade a model while it is handling another request for the
|
3078
|
+
# model. The service cannot accept subsequent requests for the model until the
|
3079
|
+
# existing upgrade request completes.
|
2917
3080
|
#
|
2918
3081
|
# If the custom acoustic model was trained with a separately created custom language
|
2919
3082
|
# model, you must use the `custom_language_model_id` parameter to specify the GUID
|
@@ -2921,6 +3084,9 @@ module IBMWatson
|
|
2921
3084
|
# the custom acoustic model can be upgraded. Omit the parameter if the custom
|
2922
3085
|
# acoustic model was not trained with a custom language model.
|
2923
3086
|
#
|
3087
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3088
|
+
# previous-generation models. It is not supported for next-generation models.
|
3089
|
+
#
|
2924
3090
|
# **See also:** [Upgrading a custom acoustic
|
2925
3091
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-acoustic).
|
2926
3092
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2976,6 +3142,9 @@ module IBMWatson
|
|
2976
3142
|
# to a request to add it to the custom acoustic model. You must use credentials for
|
2977
3143
|
# the instance of the service that owns a model to list its audio resources.
|
2978
3144
|
#
|
3145
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3146
|
+
# previous-generation models. It is not supported for next-generation models.
|
3147
|
+
#
|
2979
3148
|
# **See also:** [Listing audio resources for a custom acoustic
|
2980
3149
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#listAudio).
|
2981
3150
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -3008,8 +3177,8 @@ module IBMWatson
|
|
3008
3177
|
# the acoustic characteristics of the audio that you plan to transcribe. You must
|
3009
3178
|
# use credentials for the instance of the service that owns a model to add an audio
|
3010
3179
|
# resource to it. Adding audio data does not affect the custom acoustic model until
|
3011
|
-
# you train the model for the new data by using the
|
3012
|
-
# model
|
3180
|
+
# you train the model for the new data by using the [Train a custom acoustic
|
3181
|
+
# model](#trainacousticmodel) method.
|
3013
3182
|
#
|
3014
3183
|
# You can add individual audio files or an archive file that contains multiple audio
|
3015
3184
|
# files. Adding multiple audio files via a single archive file is significantly more
|
@@ -3034,11 +3203,14 @@ module IBMWatson
|
|
3034
3203
|
# upgrade the model until the service's analysis of all audio resources for current
|
3035
3204
|
# requests completes.
|
3036
3205
|
#
|
3037
|
-
# To determine the status of the service's analysis of the audio, use the
|
3038
|
-
# audio resource
|
3039
|
-
# customization ID of the custom model and the name of the audio
|
3040
|
-
# returns the status of the resource. Use a loop to check the
|
3041
|
-
# every few seconds until it becomes `ok`.
|
3206
|
+
# To determine the status of the service's analysis of the audio, use the [Get an
|
3207
|
+
# audio resource](#getaudio) method to poll the status of the audio. The method
|
3208
|
+
# accepts the customization ID of the custom model and the name of the audio
|
3209
|
+
# resource, and it returns the status of the resource. Use a loop to check the
|
3210
|
+
# status of the audio every few seconds until it becomes `ok`.
|
3211
|
+
#
|
3212
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3213
|
+
# previous-generation models. It is not supported for next-generation models.
|
3042
3214
|
#
|
3043
3215
|
# **See also:** [Add audio to the custom acoustic
|
3044
3216
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#addAudio).
|
@@ -3133,7 +3305,7 @@ module IBMWatson
|
|
3133
3305
|
# For an archive-type resource, the media type of the archive file. For more
|
3134
3306
|
# information, see **Content types for archive-type resources** in the method
|
3135
3307
|
# description.
|
3136
|
-
# @param contained_content_type [String]
|
3308
|
+
# @param contained_content_type [String] _For an archive-type resource_, specify the format of the audio files that are
|
3137
3309
|
# contained in the archive file if they are of type `audio/alaw`, `audio/basic`,
|
3138
3310
|
# `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and `endianness`
|
3139
3311
|
# parameters where necessary. In this case, all audio files that are contained in
|
@@ -3147,7 +3319,7 @@ module IBMWatson
|
|
3147
3319
|
# speech recognition. For more information, see **Content types for audio-type
|
3148
3320
|
# resources** in the method description.
|
3149
3321
|
#
|
3150
|
-
#
|
3322
|
+
# _For an audio-type resource_, omit the header.
|
3151
3323
|
# @param allow_overwrite [Boolean] If `true`, the specified audio resource overwrites an existing audio resource with
|
3152
3324
|
# the same name. If `false`, the request fails if an audio resource with the same
|
3153
3325
|
# name already exists. The parameter has no effect if an audio resource with the
|
@@ -3192,9 +3364,9 @@ module IBMWatson
|
|
3192
3364
|
# Gets information about an audio resource from a custom acoustic model. The method
|
3193
3365
|
# returns an `AudioListing` object whose fields depend on the type of audio resource
|
3194
3366
|
# that you specify with the method's `audio_name` parameter:
|
3195
|
-
# *
|
3367
|
+
# * _For an audio-type resource_, the object's fields match those of an
|
3196
3368
|
# `AudioResource` object: `duration`, `name`, `details`, and `status`.
|
3197
|
-
# *
|
3369
|
+
# * _For an archive-type resource_, the object includes a `container` field whose
|
3198
3370
|
# fields match those of an `AudioResource` object. It also includes an `audio`
|
3199
3371
|
# field, which contains an array of `AudioResource` objects that provides
|
3200
3372
|
# information about the audio files that are contained in the archive.
|
@@ -3202,14 +3374,17 @@ module IBMWatson
|
|
3202
3374
|
# The information includes the status of the specified audio resource. The status is
|
3203
3375
|
# important for checking the service's analysis of a resource that you add to the
|
3204
3376
|
# custom model.
|
3205
|
-
# *
|
3206
|
-
# object.
|
3207
|
-
# *
|
3377
|
+
# * _For an audio-type resource_, the `status` field is located in the
|
3378
|
+
# `AudioListing` object.
|
3379
|
+
# * _For an archive-type resource_, the `status` field is located in the
|
3208
3380
|
# `AudioResource` object that is returned in the `container` field.
|
3209
3381
|
#
|
3210
3382
|
# You must use credentials for the instance of the service that owns a model to list
|
3211
3383
|
# its audio resources.
|
3212
3384
|
#
|
3385
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3386
|
+
# previous-generation models. It is not supported for next-generation models.
|
3387
|
+
#
|
3213
3388
|
# **See also:** [Listing audio resources for a custom acoustic
|
3214
3389
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#listAudio).
|
3215
3390
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -3246,10 +3421,14 @@ module IBMWatson
|
|
3246
3421
|
# not allow deletion of individual files from an archive resource.
|
3247
3422
|
#
|
3248
3423
|
# Removing an audio resource does not affect the custom model until you train the
|
3249
|
-
# model on its updated data by using the
|
3250
|
-
# You can delete an existing audio resource from
|
3251
|
-
# is being added to the model. You must use
|
3252
|
-
# service that owns a model to delete its audio
|
3424
|
+
# model on its updated data by using the [Train a custom acoustic
|
3425
|
+
# model](#trainacousticmodel) method. You can delete an existing audio resource from
|
3426
|
+
# a model while a different resource is being added to the model. You must use
|
3427
|
+
# credentials for the instance of the service that owns a model to delete its audio
|
3428
|
+
# resources.
|
3429
|
+
#
|
3430
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3431
|
+
# previous-generation models. It is not supported for next-generation models.
|
3253
3432
|
#
|
3254
3433
|
# **See also:** [Deleting an audio resource from a custom acoustic
|
3255
3434
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#deleteAudio).
|