ibm_watson 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ibm_watson/assistant_v1.rb +4 -3
- data/lib/ibm_watson/assistant_v2.rb +2 -2
- data/lib/ibm_watson/compare_comply_v1.rb +1 -1
- data/lib/ibm_watson/discovery_v1.rb +4 -10
- data/lib/ibm_watson/discovery_v2.rb +109 -108
- data/lib/ibm_watson/language_translator_v3.rb +1 -1
- data/lib/ibm_watson/natural_language_classifier_v1.rb +11 -9
- data/lib/ibm_watson/natural_language_understanding_v1.rb +11 -13
- data/lib/ibm_watson/personality_insights_v3.rb +1 -1
- data/lib/ibm_watson/speech_to_text_v1.rb +413 -315
- data/lib/ibm_watson/text_to_speech_v1.rb +76 -74
- data/lib/ibm_watson/tone_analyzer_v3.rb +1 -1
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v4.rb +1 -1
- metadata +2 -2
@@ -14,7 +14,7 @@
|
|
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
|
# IBM Watson™ Language Translator translates text from one language to another.
|
20
20
|
# The service offers multiple IBM-provided translation models that you can customize based
|
@@ -14,18 +14,20 @@
|
|
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
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# 8 August 2022
|
19
|
+
# On 9 August 2021, IBM announced the deprecation of IBM Watson™ Natural Language
|
20
|
+
# Classifier. As of 9 September 2021, you cannot create new instances. However, existing
|
21
|
+
# instances are supported until 8 August 2022. The service will no longer be available on
|
22
|
+
# 8 August 2022.<br/><br/>As an alternative, consider migrating to IBM Watson Natural
|
23
|
+
# Language Understanding. For more information, see [Migrating to Natural Language
|
24
|
+
# Understanding](https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-migrating).
|
23
25
|
# {: deprecated}
|
24
26
|
#
|
25
|
-
# Natural Language Classifier uses machine learning algorithms to
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
27
|
+
# Natural Language Classifier uses machine learning algorithms to return the top matching
|
28
|
+
# predefined classes for short text input. You create and train a classifier to connect
|
29
|
+
# predefined classes to example texts so that the service can apply those classes to new
|
30
|
+
# inputs.
|
29
31
|
|
30
32
|
require "concurrent"
|
31
33
|
require "erb"
|
@@ -14,7 +14,7 @@
|
|
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
|
# Analyze various features of text content at scale. Provide text, raw HTML, or a public
|
20
20
|
# URL and IBM Watson Natural Language Understanding will give you results for the features
|
@@ -46,7 +46,7 @@ module IBMWatson
|
|
46
46
|
#
|
47
47
|
# @param args [Hash] The args to initialize with
|
48
48
|
# @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
|
49
|
-
# format. The current version is `2021-
|
49
|
+
# format. The current version is `2021-08-01`.
|
50
50
|
# @option args service_url [String] The base service URL to use when contacting the service.
|
51
51
|
# The base service_url may differ between IBM Cloud regions.
|
52
52
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
@@ -684,9 +684,9 @@ module IBMWatson
|
|
684
684
|
##
|
685
685
|
# @!method create_classifications_model(language:, training_data:, training_data_content_type: nil, name: nil, description: nil, model_version: nil, workspace_id: nil, version_description: nil)
|
686
686
|
# Create classifications model.
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
687
|
+
# Creates a custom classifications model by uploading training data and associated
|
688
|
+
# metadata. The model begins the training and deploying process and is ready to use
|
689
|
+
# when the `status` is `available`.
|
690
690
|
# @param language [String] The 2-letter language code of this model.
|
691
691
|
# @param training_data [File] Training data in JSON format. For more information, see [Classifications training
|
692
692
|
# data
|
@@ -750,8 +750,7 @@ module IBMWatson
|
|
750
750
|
##
|
751
751
|
# @!method list_classifications_models
|
752
752
|
# List classifications models.
|
753
|
-
#
|
754
|
-
# instance.
|
753
|
+
# Returns all custom classifications models associated with this service instance.
|
755
754
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
756
755
|
def list_classifications_models
|
757
756
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -780,7 +779,7 @@ module IBMWatson
|
|
780
779
|
##
|
781
780
|
# @!method get_classifications_model(model_id:)
|
782
781
|
# Get classifications model details.
|
783
|
-
#
|
782
|
+
# Returns the status of the classifications model with the given model ID.
|
784
783
|
# @param model_id [String] ID of the model.
|
785
784
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
786
785
|
def get_classifications_model(model_id:)
|
@@ -812,8 +811,8 @@ module IBMWatson
|
|
812
811
|
##
|
813
812
|
# @!method update_classifications_model(model_id:, language:, training_data:, training_data_content_type: nil, name: nil, description: nil, model_version: nil, workspace_id: nil, version_description: nil)
|
814
813
|
# Update classifications model.
|
815
|
-
#
|
816
|
-
#
|
814
|
+
# Overwrites the training data associated with this custom classifications model and
|
815
|
+
# retrains the model. The new model replaces the current deployment.
|
817
816
|
# @param model_id [String] ID of the model.
|
818
817
|
# @param language [String] The 2-letter language code of this model.
|
819
818
|
# @param training_data [File] Training data in JSON format. For more information, see [Classifications training
|
@@ -880,9 +879,8 @@ module IBMWatson
|
|
880
879
|
##
|
881
880
|
# @!method delete_classifications_model(model_id:)
|
882
881
|
# Delete classifications model.
|
883
|
-
#
|
884
|
-
#
|
885
|
-
# artifacts.
|
882
|
+
# Un-deploys the custom classifications model with the given model ID and deletes
|
883
|
+
# all associated customer data, including any training data or binary artifacts.
|
886
884
|
# @param model_id [String] ID of the model.
|
887
885
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
888
886
|
def delete_classifications_model(model_id:)
|
@@ -14,7 +14,7 @@
|
|
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
|
# IBM Watson™ Personality Insights is discontinued. Existing instances are
|
20
20
|
# supported until 1 December 2021, but as of 1 December 2020, you cannot create new
|
@@ -14,7 +14,7 @@
|
|
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
20
|
# speech-recognition capabilities to produce transcripts of spoken audio. The service can
|
@@ -23,12 +23,11 @@
|
|
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
|
-
# accuracy.
|
29
|
+
# minimum sampling rates of 8 kHz. The next-generation models offer high throughput and
|
30
|
+
# greater transcription accuracy.
|
32
31
|
#
|
33
32
|
# For speech recognition, the service supports synchronous and asynchronous HTTP
|
34
33
|
# Representational State Transfer (REST) interfaces. It also supports a WebSocket
|
@@ -43,10 +42,10 @@
|
|
43
42
|
# is a formal language specification that lets you restrict the phrases that the service
|
44
43
|
# can recognize.
|
45
44
|
#
|
46
|
-
# Language model customization
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# model customization.
|
45
|
+
# Language model customization is available for most previous- and next-generation models.
|
46
|
+
# Acoustic model customization is available for all previous-generation models. Grammars
|
47
|
+
# are beta functionality that is available for all previous-generation models that support
|
48
|
+
# language model customization.
|
50
49
|
|
51
50
|
require "concurrent"
|
52
51
|
require "erb"
|
@@ -125,9 +124,9 @@ module IBMWatson
|
|
125
124
|
#
|
126
125
|
# **See also:** [Listing
|
127
126
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list).
|
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.).
|
127
|
+
# @param model_id [String] The identifier of the model in the form of its name from the output of the [List
|
128
|
+
# models](#listmodels) method. (**Note:** The model `ar-AR_BroadbandModel` is
|
129
|
+
# deprecated; use `ar-MS_BroadbandModel` instead.).
|
131
130
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
132
131
|
def get_model(model_id:)
|
133
132
|
raise ArgumentError.new("model_id must be provided") if model_id.nil?
|
@@ -225,31 +224,22 @@ module IBMWatson
|
|
225
224
|
#
|
226
225
|
# ### Next-generation models
|
227
226
|
#
|
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
|
227
|
+
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8
|
228
|
+
# kHz) models for many languages. Next-generation models have higher throughput than
|
229
|
+
# the service's previous generation of `Broadband` and `Narrowband` models. When you
|
230
|
+
# use next-generation models, the service can return transcriptions more quickly and
|
236
231
|
# also provide noticeably better transcription accuracy.
|
237
232
|
#
|
238
233
|
# You specify a next-generation model by using the `model` query parameter, as you
|
239
|
-
# do a previous-generation model.
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
# * `speech_detector_sensitivity`
|
249
|
-
# * `timestamps`
|
250
|
-
#
|
251
|
-
# Many next-generation models also support the beta `low_latency` parameter, which
|
252
|
-
# is not available with previous-generation models.
|
234
|
+
# do a previous-generation model. Many next-generation models also support the
|
235
|
+
# `low_latency` parameter, which is not available with previous-generation models.
|
236
|
+
#
|
237
|
+
# But next-generation models do not support all of the parameters that are available
|
238
|
+
# for use with previous-generation models. For more information about all parameters
|
239
|
+
# that are supported for use with next-generation models, see [Supported features
|
240
|
+
# for next-generation
|
241
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features).
|
242
|
+
#
|
253
243
|
#
|
254
244
|
# **See also:** [Next-generation languages and
|
255
245
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
@@ -277,7 +267,7 @@ module IBMWatson
|
|
277
267
|
# audio format, see **Audio formats (content types)** in the method description.
|
278
268
|
# @param model [String] The identifier of the model that is to be used for the recognition request.
|
279
269
|
# (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
|
280
|
-
# `ar-MS_BroadbandModel` instead.) See [
|
270
|
+
# `ar-MS_BroadbandModel` instead.) See [Previous-generation languages and
|
281
271
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and
|
282
272
|
# [Next-generation languages and
|
283
273
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
@@ -374,7 +364,8 @@ module IBMWatson
|
|
374
364
|
# the service also converts certain keyword strings to punctuation symbols. By
|
375
365
|
# default, the service performs no smart formatting.
|
376
366
|
#
|
377
|
-
# **
|
367
|
+
# **Beta:** The parameter is beta functionality. Applies to US English, Japanese,
|
368
|
+
# and Spanish transcription only.
|
378
369
|
#
|
379
370
|
# See [Smart
|
380
371
|
# formatting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#smart-formatting).
|
@@ -383,11 +374,13 @@ module IBMWatson
|
|
383
374
|
# speaker labels. Setting `speaker_labels` to `true` forces the `timestamps`
|
384
375
|
# parameter to be `true`, regardless of whether you specify `false` for the
|
385
376
|
# parameter.
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
377
|
+
#
|
378
|
+
# **Beta:** The parameter is beta functionality.
|
379
|
+
# * For previous-generation models, the parameter can be used for Australian
|
380
|
+
# English, US English, German, Japanese, Korean, and Spanish (both broadband and
|
381
|
+
# narrowband models) and UK English (narrowband model) transcription only.
|
382
|
+
# * For next-generation models, the parameter can be used for English (Australian,
|
383
|
+
# Indian, UK, and US), German, Japanese, Korean, and Spanish transcription only.
|
391
384
|
#
|
392
385
|
# Restrictions and limitations apply to the use of speaker labels for both types of
|
393
386
|
# models. See [Speaker
|
@@ -399,8 +392,11 @@ module IBMWatson
|
|
399
392
|
# specify a grammar, you must also use the `language_customization_id` parameter to
|
400
393
|
# specify the name of the custom language model for which the grammar is defined.
|
401
394
|
# 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
|
-
#
|
395
|
+
# it does not recognize other custom words from the model's words resource.
|
396
|
+
#
|
397
|
+
# **Beta:** The parameter is beta functionality.
|
398
|
+
#
|
399
|
+
# See [Using a grammar for speech
|
404
400
|
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse).
|
405
401
|
# @param redaction [Boolean] If `true`, the service redacts, or masks, numeric data from final transcripts. The
|
406
402
|
# feature redacts any number that has three or more consecutive digits by replacing
|
@@ -413,7 +409,8 @@ module IBMWatson
|
|
413
409
|
# `keywords_threshold` parameters) and returns only a single final transcript
|
414
410
|
# (forces the `max_alternatives` parameter to be `1`).
|
415
411
|
#
|
416
|
-
# **
|
412
|
+
# **Beta:** The parameter is beta functionality. Applies to US English, Japanese,
|
413
|
+
# and Korean transcription only.
|
417
414
|
#
|
418
415
|
# See [Numeric
|
419
416
|
# redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction).
|
@@ -482,14 +479,11 @@ module IBMWatson
|
|
482
479
|
# produce results even more quickly, though the results might be less accurate when
|
483
480
|
# the parameter is used.
|
484
481
|
#
|
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.
|
482
|
+
# The parameter is not available for previous-generation `Broadband` and
|
483
|
+
# `Narrowband` models. It is available only for some next-generation models. For a
|
484
|
+
# list of next-generation models that support low latency, see [Supported
|
485
|
+
# next-generation language
|
486
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported).
|
493
487
|
# * For more information about the `low_latency` parameter, see [Low
|
494
488
|
# latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency).
|
495
489
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -783,9 +777,9 @@ module IBMWatson
|
|
783
777
|
# The service sends only a single `GET` request to the callback URL. If the service
|
784
778
|
# does not receive a reply with a response code of 200 and a body that echoes the
|
785
779
|
# 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
|
-
#
|
780
|
+
# the URL; it instead sends status code 400 in response to the request to register a
|
781
|
+
# callback. If the requested callback URL is already allowlisted, the service
|
782
|
+
# responds to the initial registration request with response code 200.
|
789
783
|
#
|
790
784
|
# If you specify a user secret with the request, the service uses it as a key to
|
791
785
|
# calculate an HMAC-SHA1 signature of the challenge string in its response to the
|
@@ -840,9 +834,10 @@ module IBMWatson
|
|
840
834
|
##
|
841
835
|
# @!method unregister_callback(callback_url:)
|
842
836
|
# 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
|
837
|
+
# Unregisters a callback URL that was previously allowlisted with a [Register a
|
838
|
+
# callback](#registercallback) request for use with the asynchronous interface. Once
|
839
|
+
# unregistered, the URL can no longer be used with asynchronous recognition
|
840
|
+
# requests.
|
846
841
|
#
|
847
842
|
# **See also:** [Unregistering a callback
|
848
843
|
# URL](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#unregister).
|
@@ -885,17 +880,17 @@ module IBMWatson
|
|
885
880
|
# to subscribe to specific events and to specify a string that is to be included
|
886
881
|
# with each notification for the job.
|
887
882
|
# * 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.
|
883
|
+
# parameters. You must then use the [Check jobs](#checkjobs) or [Check a
|
884
|
+
# job](#checkjob) methods to check the status of the job, using the latter to
|
885
|
+
# retrieve the results when the job is complete.
|
891
886
|
#
|
892
887
|
# The two approaches are not mutually exclusive. You can poll the service for job
|
893
888
|
# status or obtain results from the service manually even if you include a callback
|
894
889
|
# URL. In both cases, you can include the `results_ttl` parameter to specify how
|
895
890
|
# 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.
|
891
|
+
# HTTPS [Check a job](#checkjob) method to retrieve results is more secure than
|
892
|
+
# receiving them via callback notification over HTTP because it provides
|
893
|
+
# confidentiality in addition to authentication and data integrity.
|
899
894
|
#
|
900
895
|
# The method supports the same basic parameters as other HTTP and WebSocket
|
901
896
|
# recognition requests. It also supports the following parameters specific to the
|
@@ -975,31 +970,22 @@ module IBMWatson
|
|
975
970
|
#
|
976
971
|
# ### Next-generation models
|
977
972
|
#
|
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
|
973
|
+
# The service supports next-generation `Multimedia` (16 kHz) and `Telephony` (8
|
974
|
+
# kHz) models for many languages. Next-generation models have higher throughput than
|
975
|
+
# the service's previous generation of `Broadband` and `Narrowband` models. When you
|
976
|
+
# use next-generation models, the service can return transcriptions more quickly and
|
986
977
|
# also provide noticeably better transcription accuracy.
|
987
978
|
#
|
988
979
|
# 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
|
-
# * `speech_detector_sensitivity`
|
999
|
-
# * `timestamps`
|
1000
|
-
#
|
1001
|
-
# Many next-generation models also support the beta `low_latency` parameter, which
|
1002
|
-
# is not available with previous-generation models.
|
980
|
+
# do a previous-generation model. Many next-generation models also support the
|
981
|
+
# `low_latency` parameter, which is not available with previous-generation models.
|
982
|
+
#
|
983
|
+
# But next-generation models do not support all of the parameters that are available
|
984
|
+
# for use with previous-generation models. For more information about all parameters
|
985
|
+
# that are supported for use with next-generation models, see [Supported features
|
986
|
+
# for next-generation
|
987
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features).
|
988
|
+
#
|
1003
989
|
#
|
1004
990
|
# **See also:** [Next-generation languages and
|
1005
991
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
@@ -1008,14 +994,14 @@ module IBMWatson
|
|
1008
994
|
# audio format, see **Audio formats (content types)** in the method description.
|
1009
995
|
# @param model [String] The identifier of the model that is to be used for the recognition request.
|
1010
996
|
# (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use
|
1011
|
-
# `ar-MS_BroadbandModel` instead.) See [
|
997
|
+
# `ar-MS_BroadbandModel` instead.) See [Previous-generation languages and
|
1012
998
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and
|
1013
999
|
# [Next-generation languages and
|
1014
1000
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).
|
1015
1001
|
# @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.
|
1002
|
+
# successfully allowlisted by using the [Register a callback](#registercallback)
|
1003
|
+
# method. You can include the same callback URL with any number of job creation
|
1004
|
+
# requests. Omit the parameter to poll the service for job completion and results.
|
1019
1005
|
#
|
1020
1006
|
# Use the `user_token` parameter to specify a unique user-specified string with each
|
1021
1007
|
# job to differentiate the callback notifications for the jobs.
|
@@ -1024,8 +1010,8 @@ module IBMWatson
|
|
1024
1010
|
# * `recognitions.started` generates a callback notification when the service begins
|
1025
1011
|
# to process the job.
|
1026
1012
|
# * `recognitions.completed` generates a callback notification when the job is
|
1027
|
-
# complete. You must use the
|
1028
|
-
# they time out or are deleted.
|
1013
|
+
# complete. You must use the [Check a job](#checkjob) method to retrieve the results
|
1014
|
+
# before they time out or are deleted.
|
1029
1015
|
# * `recognitions.completed_with_results` generates a callback notification when the
|
1030
1016
|
# job is complete. The notification includes the results of the request.
|
1031
1017
|
# * `recognitions.failed` generates a callback notification if the service
|
@@ -1139,7 +1125,8 @@ module IBMWatson
|
|
1139
1125
|
# the service also converts certain keyword strings to punctuation symbols. By
|
1140
1126
|
# default, the service performs no smart formatting.
|
1141
1127
|
#
|
1142
|
-
# **
|
1128
|
+
# **Beta:** The parameter is beta functionality. Applies to US English, Japanese,
|
1129
|
+
# and Spanish transcription only.
|
1143
1130
|
#
|
1144
1131
|
# See [Smart
|
1145
1132
|
# formatting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#smart-formatting).
|
@@ -1148,11 +1135,13 @@ module IBMWatson
|
|
1148
1135
|
# speaker labels. Setting `speaker_labels` to `true` forces the `timestamps`
|
1149
1136
|
# parameter to be `true`, regardless of whether you specify `false` for the
|
1150
1137
|
# parameter.
|
1151
|
-
#
|
1152
|
-
#
|
1153
|
-
#
|
1154
|
-
#
|
1155
|
-
#
|
1138
|
+
#
|
1139
|
+
# **Beta:** The parameter is beta functionality.
|
1140
|
+
# * For previous-generation models, the parameter can be used for Australian
|
1141
|
+
# English, US English, German, Japanese, Korean, and Spanish (both broadband and
|
1142
|
+
# narrowband models) and UK English (narrowband model) transcription only.
|
1143
|
+
# * For next-generation models, the parameter can be used for English (Australian,
|
1144
|
+
# Indian, UK, and US), German, Japanese, Korean, and Spanish transcription only.
|
1156
1145
|
#
|
1157
1146
|
# Restrictions and limitations apply to the use of speaker labels for both types of
|
1158
1147
|
# models. See [Speaker
|
@@ -1164,8 +1153,11 @@ module IBMWatson
|
|
1164
1153
|
# specify a grammar, you must also use the `language_customization_id` parameter to
|
1165
1154
|
# specify the name of the custom language model for which the grammar is defined.
|
1166
1155
|
# 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
|
-
#
|
1156
|
+
# it does not recognize other custom words from the model's words resource.
|
1157
|
+
#
|
1158
|
+
# **Beta:** The parameter is beta functionality.
|
1159
|
+
#
|
1160
|
+
# See [Using a grammar for speech
|
1169
1161
|
# recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse).
|
1170
1162
|
# @param redaction [Boolean] If `true`, the service redacts, or masks, numeric data from final transcripts. The
|
1171
1163
|
# feature redacts any number that has three or more consecutive digits by replacing
|
@@ -1178,7 +1170,8 @@ module IBMWatson
|
|
1178
1170
|
# `keywords_threshold` parameters) and returns only a single final transcript
|
1179
1171
|
# (forces the `max_alternatives` parameter to be `1`).
|
1180
1172
|
#
|
1181
|
-
# **
|
1173
|
+
# **Beta:** The parameter is beta functionality. Applies to US English, Japanese,
|
1174
|
+
# and Korean transcription only.
|
1182
1175
|
#
|
1183
1176
|
# See [Numeric
|
1184
1177
|
# redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction).
|
@@ -1269,14 +1262,11 @@ module IBMWatson
|
|
1269
1262
|
# produce results even more quickly, though the results might be less accurate when
|
1270
1263
|
# the parameter is used.
|
1271
1264
|
#
|
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.
|
1265
|
+
# The parameter is not available for previous-generation `Broadband` and
|
1266
|
+
# `Narrowband` models. It is available only for some next-generation models. For a
|
1267
|
+
# list of next-generation models that support low latency, see [Supported
|
1268
|
+
# next-generation language
|
1269
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-supported).
|
1280
1270
|
# * For more information about the `low_latency` parameter, see [Low
|
1281
1271
|
# latency](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-interim#low-latency).
|
1282
1272
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1345,10 +1335,10 @@ module IBMWatson
|
|
1345
1335
|
# credentials with which it is called. The method also returns the creation and
|
1346
1336
|
# update times of each job, and, if a job was created with a callback URL and a user
|
1347
1337
|
# 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.
|
1338
|
+
# `completed` or not one of the latest 100 outstanding jobs, use the [Check a
|
1339
|
+
# job[(#checkjob) method. A job and its results remain available until you delete
|
1340
|
+
# them with the [Delete a job](#deletejob) method or until the job's time to live
|
1341
|
+
# expires, whichever comes first.
|
1352
1342
|
#
|
1353
1343
|
# **See also:** [Checking the status of the latest
|
1354
1344
|
# jobs](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#jobs).
|
@@ -1382,8 +1372,8 @@ module IBMWatson
|
|
1382
1372
|
# You can use the method to retrieve the results of any job, regardless of whether
|
1383
1373
|
# it was submitted with a callback URL and the `recognitions.completed_with_results`
|
1384
1374
|
# 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.
|
1375
|
+
# available. Use the [Check jobs](#checkjobs) method to request information about
|
1376
|
+
# the most recent jobs associated with the calling credentials.
|
1387
1377
|
#
|
1388
1378
|
# **See also:** [Checking the status and retrieving the results of a
|
1389
1379
|
# job](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#job).
|
@@ -1471,28 +1461,28 @@ module IBMWatson
|
|
1471
1461
|
# customizes.
|
1472
1462
|
#
|
1473
1463
|
# To determine whether a base model supports language model customization, use the
|
1474
|
-
#
|
1475
|
-
# to `true`. You can also refer to [Language support
|
1476
|
-
#
|
1464
|
+
# [Get a model](#getmodel) method and check that the attribute
|
1465
|
+
# `custom_language_model` is set to `true`. You can also refer to [Language support
|
1466
|
+
# for
|
1467
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
|
1477
1468
|
# @param dialect [String] The dialect of the specified language that is to be used with the custom language
|
1478
1469
|
# model. For most languages, the dialect matches the language of the base model by
|
1479
|
-
# default. For example, `en-US` is used for
|
1480
|
-
#
|
1470
|
+
# default. For example, `en-US` is used for the US English language models. All
|
1471
|
+
# dialect values are case-insensitive.
|
1481
1472
|
#
|
1482
|
-
#
|
1483
|
-
#
|
1473
|
+
# The parameter is meaningful only for Spanish language models, for which you can
|
1474
|
+
# always safely omit the parameter to have the service create the correct mapping.
|
1475
|
+
# For Spanish, the service creates a custom language model that is suited for speech
|
1476
|
+
# in one of the following dialects:
|
1484
1477
|
# * `es-ES` for Castilian Spanish (`es-ES` models)
|
1485
1478
|
# * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE`
|
1486
1479
|
# models)
|
1487
1480
|
# * `es-US` for Mexican (North American) Spanish (`es-MX` models)
|
1488
1481
|
#
|
1489
|
-
#
|
1490
|
-
#
|
1491
|
-
#
|
1492
|
-
#
|
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.
|
1482
|
+
# If you specify the `dialect` parameter for a non-Spanish language model, its value
|
1483
|
+
# must match the language of the base model. If you specify the `dialect` for a
|
1484
|
+
# Spanish language model, its value must match one of the defined mappings (`es-ES`,
|
1485
|
+
# `es-LA`, or `es-MX`).
|
1496
1486
|
# @param description [String] A description of the new custom language model. Use a localized description that
|
1497
1487
|
# matches the language of the custom model.
|
1498
1488
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1543,7 +1533,7 @@ module IBMWatson
|
|
1543
1533
|
#
|
1544
1534
|
# To determine the languages for which customization is available, see [Language
|
1545
1535
|
# support for
|
1546
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
1536
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
|
1547
1537
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1548
1538
|
def list_language_models(language: nil)
|
1549
1539
|
headers = {
|
@@ -1647,12 +1637,13 @@ module IBMWatson
|
|
1647
1637
|
# the current load on the service. The method returns an HTTP 200 response code to
|
1648
1638
|
# indicate that the training process has begun.
|
1649
1639
|
#
|
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
|
1640
|
+
# You can monitor the status of the training by using the [Get a custom language
|
1641
|
+
# model](#getlanguagemodel) method to poll the model's status. Use a loop to check
|
1642
|
+
# the status every 10 seconds. The method returns a `LanguageModel` object that
|
1643
|
+
# includes `status` and `progress` fields. A status of `available` means that the
|
1644
|
+
# custom model is trained and ready to use. The service cannot accept subsequent
|
1645
|
+
# training requests or requests to add new resources until the existing request
|
1646
|
+
# completes.
|
1656
1647
|
#
|
1657
1648
|
# **See also:** [Train the custom language
|
1658
1649
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#trainModel-language).
|
@@ -1672,14 +1663,18 @@ module IBMWatson
|
|
1672
1663
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1673
1664
|
# the request. You must make the request with credentials for the instance of the
|
1674
1665
|
# service that owns the custom model.
|
1675
|
-
# @param word_type_to_add [String]
|
1676
|
-
# train the model:
|
1666
|
+
# @param word_type_to_add [String] _For custom models that are based on previous-generation models_, the type of
|
1667
|
+
# words from the custom language model's words resource on which to train the model:
|
1677
1668
|
# * `all` (the default) trains the model on all new words, regardless of whether
|
1678
1669
|
# they were extracted from corpora or grammars or were added or modified by the
|
1679
1670
|
# user.
|
1680
|
-
# * `user` trains the model only on
|
1671
|
+
# * `user` trains the model only on custom words that were added or modified by the
|
1681
1672
|
# user directly. The model is not trained on new words extracted from corpora or
|
1682
1673
|
# grammars.
|
1674
|
+
#
|
1675
|
+
# _For custom models that are based on next-generation models_, the service ignores
|
1676
|
+
# the parameter. The words resource contains only custom words that the user adds or
|
1677
|
+
# modifies directly, so the parameter is unnecessary.
|
1683
1678
|
# @param customization_weight [Float] Specifies a customization weight for the custom language model. The customization
|
1684
1679
|
# weight tells the service how much weight to give to words from the custom language
|
1685
1680
|
# model compared to those from the base model for speech recognition. Specify a
|
@@ -1770,12 +1765,16 @@ module IBMWatson
|
|
1770
1765
|
#
|
1771
1766
|
# The method returns an HTTP 200 response code to indicate that the upgrade process
|
1772
1767
|
# 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. While it is
|
1776
|
-
# custom model has the status `upgrading`. When the upgrade is
|
1777
|
-
# resumes the status that it had prior to upgrade. The service
|
1778
|
-
# subsequent requests for the model until the upgrade completes.
|
1768
|
+
# [Get a custom language model](#getlanguagemodel) method to poll the model's
|
1769
|
+
# status. The method returns a `LanguageModel` object that includes `status` and
|
1770
|
+
# `progress` fields. Use a loop to check the status every 10 seconds. While it is
|
1771
|
+
# being upgraded, the custom model has the status `upgrading`. When the upgrade is
|
1772
|
+
# complete, the model resumes the status that it had prior to upgrade. The service
|
1773
|
+
# cannot accept subsequent requests for the model until the upgrade completes.
|
1774
|
+
#
|
1775
|
+
# **Note:** Upgrading is necessary only for custom language models that are based on
|
1776
|
+
# previous-generation models. Only a single version of a custom model that is based
|
1777
|
+
# on a next-generation model is ever available.
|
1779
1778
|
#
|
1780
1779
|
# **See also:** [Upgrading a custom language
|
1781
1780
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-language).
|
@@ -1809,9 +1808,10 @@ module IBMWatson
|
|
1809
1808
|
# @!method list_corpora(customization_id:)
|
1810
1809
|
# List corpora.
|
1811
1810
|
# Lists information about all corpora from a custom language model. The information
|
1812
|
-
# includes the total number of words
|
1813
|
-
#
|
1814
|
-
#
|
1811
|
+
# includes the name, status, and total number of words for each corpus. _For custom
|
1812
|
+
# models that are based on previous-generation models_, it also includes the number
|
1813
|
+
# of out-of-vocabulary (OOV) words from the corpus. You must use credentials for the
|
1814
|
+
# instance of the service that owns a model to list its corpora.
|
1815
1815
|
#
|
1816
1816
|
# **See also:** [Listing corpora for a custom language
|
1817
1817
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#listCorpora).
|
@@ -1845,51 +1845,60 @@ module IBMWatson
|
|
1845
1845
|
# Use multiple requests to submit multiple corpus text files. You must use
|
1846
1846
|
# credentials for the instance of the service that owns a model to add a corpus to
|
1847
1847
|
# it. Adding a corpus does not affect the custom language model until you train the
|
1848
|
-
# model for the new data by using the
|
1848
|
+
# model for the new data by using the [Train a custom language
|
1849
|
+
# model](#trainlanguagemodel) method.
|
1849
1850
|
#
|
1850
1851
|
# 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.
|
1852
|
+
# interest to enable the service to parse the words in context. The more sentences
|
1853
|
+
# you add that represent the context in which speakers use words from the domain,
|
1854
|
+
# the better the service's recognition accuracy.
|
1854
1855
|
#
|
1855
1856
|
# 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
|
-
#
|
1857
|
+
# then asynchronously processes and automatically extracts data from the contents of
|
1858
|
+
# the corpus. This operation can take on the order of minutes to complete depending
|
1859
|
+
# on the current load on the service, the total number of words in the corpus, and,
|
1860
|
+
# _for custom models that are based on previous-generation models_, the number of
|
1861
|
+
# new (out-of-vocabulary) words in the corpus. You cannot submit requests to add
|
1862
|
+
# additional resources to the custom model or to train the model until the service's
|
1863
|
+
# analysis of the corpus for the current request completes. Use the [Get a
|
1864
|
+
# corpus](#getcorpus) method to check the status of the analysis.
|
1865
|
+
#
|
1866
|
+
# _For custom models that are based on previous-generation models_, the service
|
1867
|
+
# auto-populates the model's words resource with words from the corpus that are not
|
1868
|
+
# found in its base vocabulary. These words are referred to as out-of-vocabulary
|
1869
|
+
# (OOV) words. After adding a corpus, you must validate the words resource to ensure
|
1870
|
+
# that each OOV word's definition is complete and valid. You can use the [List
|
1871
|
+
# custom words](#listwords) method to examine the words resource. You can use other
|
1872
|
+
# words method to eliminate typos and modify how words are pronounced as needed.
|
1871
1873
|
#
|
1872
1874
|
# To add a corpus file that has the same name as an existing corpus, set the
|
1873
1875
|
# `allow_overwrite` parameter to `true`; otherwise, the request fails. Overwriting
|
1874
1876
|
# an existing corpus causes the service to process the corpus text file and extract
|
1875
|
-
#
|
1876
|
-
#
|
1877
|
-
#
|
1878
|
-
#
|
1877
|
+
# its data anew. _For a custom model that is based on a previous-generation model_,
|
1878
|
+
# the service first removes any OOV words that are associated with the existing
|
1879
|
+
# corpus from the model's words resource unless they were also added by another
|
1880
|
+
# corpus or grammar, or they have been modified in some way with the [Add custom
|
1881
|
+
# words](#addwords) or [Add a custom word](#addword) method.
|
1879
1882
|
#
|
1880
1883
|
# 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.
|
1884
|
+
# to a maximum of 10 million total words from all sources combined. _For a custom
|
1885
|
+
# model that is based on a previous-generation model_, you can add no more than 90
|
1886
|
+
# thousand custom (OOV) words to a model. This includes words that the service
|
1887
|
+
# extracts from corpora and grammars, and words that you add directly.
|
1885
1888
|
#
|
1886
1889
|
# **See also:**
|
1887
1890
|
# * [Add a corpus to the custom language
|
1888
1891
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addCorpus)
|
1889
|
-
# * [Working with
|
1890
|
-
#
|
1891
|
-
# * [
|
1892
|
-
#
|
1892
|
+
# * [Working with corpora for previous-generation
|
1893
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingCorpora)
|
1894
|
+
# * [Working with corpora for next-generation
|
1895
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingCorpora-ng)
|
1896
|
+
#
|
1897
|
+
# * [Validating a words resource for previous-generation
|
1898
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
1899
|
+
#
|
1900
|
+
# * [Validating a words resource for next-generation
|
1901
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
1893
1902
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
1894
1903
|
# the request. You must make the request with credentials for the instance of the
|
1895
1904
|
# service that owns the custom model.
|
@@ -1912,10 +1921,10 @@ module IBMWatson
|
|
1912
1921
|
# in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 encoding
|
1913
1922
|
# if it encounters non-ASCII characters.
|
1914
1923
|
#
|
1915
|
-
# Make sure that you know the character encoding of the file. You must use that
|
1924
|
+
# Make sure that you know the character encoding of the file. You must use that same
|
1916
1925
|
# encoding when working with the words in the custom language model. For more
|
1917
|
-
# information, see [Character
|
1918
|
-
#
|
1926
|
+
# information, see [Character encoding for custom
|
1927
|
+
# words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWords#charEncoding).
|
1919
1928
|
#
|
1920
1929
|
#
|
1921
1930
|
# With the `curl` command, use the `--data-binary` option to upload the file for the
|
@@ -1964,9 +1973,10 @@ module IBMWatson
|
|
1964
1973
|
# @!method get_corpus(customization_id:, corpus_name:)
|
1965
1974
|
# Get a corpus.
|
1966
1975
|
# Gets information about a corpus from a custom language model. The information
|
1967
|
-
# includes the total number of words
|
1968
|
-
#
|
1969
|
-
#
|
1976
|
+
# includes the name, status, and total number of words for the corpus. _For custom
|
1977
|
+
# models that are based on previous-generation models_, it also includes the number
|
1978
|
+
# of out-of-vocabulary (OOV) words from the corpus. You must use credentials for the
|
1979
|
+
# instance of the service that owns a model to list its corpora.
|
1970
1980
|
#
|
1971
1981
|
# **See also:** [Listing corpora for a custom language
|
1972
1982
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#listCorpora).
|
@@ -1999,14 +2009,18 @@ module IBMWatson
|
|
1999
2009
|
##
|
2000
2010
|
# @!method delete_corpus(customization_id:, corpus_name:)
|
2001
2011
|
# Delete a corpus.
|
2002
|
-
# Deletes an existing corpus from a custom language model.
|
2003
|
-
#
|
2004
|
-
# model
|
2005
|
-
#
|
2006
|
-
#
|
2007
|
-
#
|
2008
|
-
#
|
2009
|
-
#
|
2012
|
+
# Deletes an existing corpus from a custom language model. Removing a corpus does
|
2013
|
+
# not affect the custom model until you train the model with the [Train a custom
|
2014
|
+
# language model](#trainlanguagemodel) method. You must use credentials for the
|
2015
|
+
# instance of the service that owns a model to delete its corpora.
|
2016
|
+
#
|
2017
|
+
# _For custom models that are based on previous-generation models_, the service
|
2018
|
+
# removes any out-of-vocabulary (OOV) words that are associated with the corpus from
|
2019
|
+
# the custom model's words resource unless they were also added by another corpus or
|
2020
|
+
# grammar, or they were modified in some way with the [Add custom words](#addwords)
|
2021
|
+
# or [Add a custom word](#addword) method.
|
2022
|
+
#
|
2023
|
+
#
|
2010
2024
|
#
|
2011
2025
|
# **See also:** [Deleting a corpus from a custom language
|
2012
2026
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageCorpora#deleteCorpus).
|
@@ -2044,10 +2058,11 @@ module IBMWatson
|
|
2044
2058
|
# List custom words.
|
2045
2059
|
# Lists information about custom words from a custom language model. You can list
|
2046
2060
|
# 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
|
-
#
|
2061
|
+
# added or modified by the user, or, _for a custom model that is based on a
|
2062
|
+
# previous-generation model_, only out-of-vocabulary (OOV) words that were extracted
|
2063
|
+
# from corpora or are recognized by grammars. You can also indicate the order in
|
2064
|
+
# which the service is to return words; by default, the service lists words in
|
2065
|
+
# ascending alphabetical order. You must use credentials for the instance of the
|
2051
2066
|
# service that owns a model to list information about its words.
|
2052
2067
|
#
|
2053
2068
|
# **See also:** [Listing words from a custom language
|
@@ -2060,6 +2075,10 @@ module IBMWatson
|
|
2060
2075
|
# * `user` shows only custom words that were added or modified by the user directly.
|
2061
2076
|
# * `corpora` shows only OOV that were extracted from corpora.
|
2062
2077
|
# * `grammars` shows only OOV words that are recognized by grammars.
|
2078
|
+
#
|
2079
|
+
# _For a custom model that is based on a next-generation model_, only `all` and
|
2080
|
+
# `user` apply. Both options return the same results. Words from other sources are
|
2081
|
+
# not added to custom models that are based on next-generation models.
|
2063
2082
|
# @param sort [String] Indicates the order in which the words are to be listed, `alphabetical` or by
|
2064
2083
|
# `count`. You can prepend an optional `+` or `-` to an argument to indicate whether
|
2065
2084
|
# the results are to be sorted in ascending or descending order. By default, words
|
@@ -2096,10 +2115,14 @@ module IBMWatson
|
|
2096
2115
|
##
|
2097
2116
|
# @!method add_words(customization_id:, words:)
|
2098
2117
|
# Add custom words.
|
2099
|
-
# Adds one or more custom words to a custom language model.
|
2118
|
+
# Adds one or more custom words to a custom language model. You can use this method
|
2119
|
+
# to add words or to modify existing words in a custom model's words resource. _For
|
2120
|
+
# custom models that are based on previous-generation models_, the service populates
|
2100
2121
|
# 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
|
-
#
|
2122
|
+
# corpus or grammar that is added to the model. You can use this method to modify
|
2123
|
+
# OOV words in the model's words resource.
|
2124
|
+
#
|
2125
|
+
# _For a custom model that is based on a previous-generation model_, the words
|
2103
2126
|
# resource for a model can contain a maximum of 90 thousand custom (OOV) words. This
|
2104
2127
|
# includes words that the service extracts from corpora and grammars and words that
|
2105
2128
|
# you add directly.
|
@@ -2107,25 +2130,26 @@ module IBMWatson
|
|
2107
2130
|
# You must use credentials for the instance of the service that owns a model to add
|
2108
2131
|
# or modify custom words for the model. Adding or modifying custom words does not
|
2109
2132
|
# affect the custom model until you train the model for the new data by using the
|
2110
|
-
#
|
2133
|
+
# [Train a custom language model](#trainlanguagemodel) method.
|
2111
2134
|
#
|
2112
2135
|
# 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.
|
2136
|
+
# `CustomWord` objects, one per word. Use the object's `word` parameter to identify
|
2137
|
+
# the word that is to be added. You can also provide one or both of the optional
|
2138
|
+
# `display_as` or `sounds_like` fields for each word.
|
2125
2139
|
# * The `display_as` field provides a different way of spelling the word in a
|
2126
2140
|
# transcript. Use the parameter when you want the word to appear different from its
|
2127
2141
|
# usual representation or from its spelling in training data. For example, you might
|
2128
|
-
# indicate that the word `IBM
|
2142
|
+
# indicate that the word `IBM` is to be displayed as `IBM™`.
|
2143
|
+
# * The `sounds_like` field, _which can be used only with a custom model that is
|
2144
|
+
# based on a previous-generation model_, provides an array of one or more
|
2145
|
+
# pronunciations for the word. Use the parameter to specify how the word can be
|
2146
|
+
# pronounced by users. Use the parameter for words that are difficult to pronounce,
|
2147
|
+
# foreign words, acronyms, and so on. For example, you might specify that the word
|
2148
|
+
# `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like
|
2149
|
+
# pronunciations for a word. If you omit the `sounds_like` field, the service
|
2150
|
+
# attempts to set the field to its pronunciation of the word. It cannot generate a
|
2151
|
+
# pronunciation for all words, so you must review the word's definition to ensure
|
2152
|
+
# that it is complete and valid.
|
2129
2153
|
#
|
2130
2154
|
# If you add a custom word that already exists in the words resource for the custom
|
2131
2155
|
# model, the new definition overwrites the existing data for the word. If the
|
@@ -2137,26 +2161,30 @@ module IBMWatson
|
|
2137
2161
|
# time that it takes for the analysis to complete depends on the number of new words
|
2138
2162
|
# that you add but is generally faster than adding a corpus or grammar.
|
2139
2163
|
#
|
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.
|
2164
|
+
# You can monitor the status of the request by using the [Get a custom language
|
2165
|
+
# model](#getlanguagemodel) method to poll the model's status. Use a loop to check
|
2166
|
+
# the status every 10 seconds. The method returns a `Customization` object that
|
2167
|
+
# includes a `status` field. A status of `ready` means that the words have been
|
2168
|
+
# added to the custom model. The service cannot accept requests to add new data or
|
2169
|
+
# to train the model until the existing request completes.
|
2151
2170
|
#
|
2171
|
+
# You can use the [List custom words](#listwords) or [Get a custom word](#getword)
|
2172
|
+
# method to review the words that you add. Words with an invalid `sounds_like` field
|
2173
|
+
# include an `error` field that describes the problem. You can use other
|
2174
|
+
# words-related methods to correct errors, eliminate typos, and modify how words are
|
2175
|
+
# pronounced as needed.
|
2152
2176
|
#
|
2153
2177
|
# **See also:**
|
2154
2178
|
# * [Add words to the custom language
|
2155
2179
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addWords)
|
2156
|
-
# * [Working with custom
|
2157
|
-
#
|
2158
|
-
# * [
|
2159
|
-
#
|
2180
|
+
# * [Working with custom words for previous-generation
|
2181
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingWords)
|
2182
|
+
# * [Working with custom words for next-generation
|
2183
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingWords-ng)
|
2184
|
+
# * [Validating a words resource for previous-generation
|
2185
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
2186
|
+
# * [Validating a words resource for next-generation
|
2187
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
2160
2188
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2161
2189
|
# the request. You must make the request with credentials for the instance of the
|
2162
2190
|
# service that owns the custom model.
|
@@ -2192,47 +2220,57 @@ module IBMWatson
|
|
2192
2220
|
##
|
2193
2221
|
# @!method add_word(customization_id:, word_name:, word: nil, sounds_like: nil, display_as: nil)
|
2194
2222
|
# Add a custom word.
|
2195
|
-
# Adds a custom word to a custom language model.
|
2196
|
-
#
|
2197
|
-
#
|
2198
|
-
#
|
2199
|
-
#
|
2200
|
-
#
|
2223
|
+
# Adds a custom word to a custom language model. You can use this method to add a
|
2224
|
+
# word or to modify an existing word in the words resource. _For custom models that
|
2225
|
+
# are based on previous-generation models_, the service populates the words resource
|
2226
|
+
# for a custom model with out-of-vocabulary (OOV) words from each corpus or grammar
|
2227
|
+
# that is added to the model. You can use this method to modify OOV words in the
|
2228
|
+
# model's words resource.
|
2229
|
+
#
|
2230
|
+
# _For a custom model that is based on a previous-generation models_, the words
|
2231
|
+
# resource for a model can contain a maximum of 90 thousand custom (OOV) words. This
|
2232
|
+
# includes words that the service extracts from corpora and grammars and words that
|
2233
|
+
# you add directly.
|
2201
2234
|
#
|
2202
2235
|
# You must use credentials for the instance of the service that owns a model to add
|
2203
2236
|
# or modify a custom word for the model. Adding or modifying a custom word does not
|
2204
2237
|
# affect the custom model until you train the model for the new data by using the
|
2205
|
-
#
|
2238
|
+
# [Train a custom language model](#trainlanguagemodel) method.
|
2206
2239
|
#
|
2207
2240
|
# Use the `word_name` parameter to specify the custom word that is to be added or
|
2208
2241
|
# 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.
|
2242
|
+
# `display_as` or `sounds_like` fields for the word.
|
2219
2243
|
# * The `display_as` field provides a different way of spelling the word in a
|
2220
2244
|
# transcript. Use the parameter when you want the word to appear different from its
|
2221
2245
|
# usual representation or from its spelling in training data. For example, you might
|
2222
|
-
# indicate that the word `IBM
|
2246
|
+
# indicate that the word `IBM` is to be displayed as `IBM™`.
|
2247
|
+
# * The `sounds_like` field, _which can be used only with a custom model that is
|
2248
|
+
# based on a previous-generation model_, provides an array of one or more
|
2249
|
+
# pronunciations for the word. Use the parameter to specify how the word can be
|
2250
|
+
# pronounced by users. Use the parameter for words that are difficult to pronounce,
|
2251
|
+
# foreign words, acronyms, and so on. For example, you might specify that the word
|
2252
|
+
# `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like
|
2253
|
+
# pronunciations for a word. If you omit the `sounds_like` field, the service
|
2254
|
+
# attempts to set the field to its pronunciation of the word. It cannot generate a
|
2255
|
+
# pronunciation for all words, so you must review the word's definition to ensure
|
2256
|
+
# that it is complete and valid.
|
2223
2257
|
#
|
2224
2258
|
# If you add a custom word that already exists in the words resource for the custom
|
2225
2259
|
# model, the new definition overwrites the existing data for the word. If the
|
2226
2260
|
# service encounters an error, it does not add the word to the words resource. Use
|
2227
|
-
# the
|
2261
|
+
# the [Get a custom word](#getword) method to review the word that you add.
|
2228
2262
|
#
|
2229
2263
|
# **See also:**
|
2230
2264
|
# * [Add words to the custom language
|
2231
2265
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#addWords)
|
2232
|
-
# * [Working with custom
|
2233
|
-
#
|
2234
|
-
# * [
|
2235
|
-
#
|
2266
|
+
# * [Working with custom words for previous-generation
|
2267
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#workingWords)
|
2268
|
+
# * [Working with custom words for next-generation
|
2269
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#workingWords-ng)
|
2270
|
+
# * [Validating a words resource for previous-generation
|
2271
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords#validateModel)
|
2272
|
+
# * [Validating a words resource for next-generation
|
2273
|
+
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ng#validateModel-ng).
|
2236
2274
|
# @param customization_id [String] The customization ID (GUID) of the custom language model that is to be used for
|
2237
2275
|
# the request. You must make the request with credentials for the instance of the
|
2238
2276
|
# service that owns the custom model.
|
@@ -2241,14 +2279,16 @@ module IBMWatson
|
|
2241
2279
|
# the tokens of compound words. URL-encode the word if it includes non-ASCII
|
2242
2280
|
# characters. For more information, see [Character
|
2243
2281
|
# 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
|
-
#
|
2282
|
+
# @param word [String] For the [Add custom words](#addwords) method, you must specify the custom word
|
2283
|
+
# that is to be added to or updated in the custom model. Do not include spaces in
|
2284
|
+
# the word. Use a `-` (dash) or `_` (underscore) to connect the tokens of compound
|
2285
|
+
# words.
|
2286
|
+
#
|
2287
|
+
# Omit this parameter for the [Add a custom word](#addword) method.
|
2288
|
+
# @param sounds_like [Array[String]] _For a custom model that is based on a previous-generation model_, an array of
|
2289
|
+
# sounds-like pronunciations for the custom word. Specify how words that are
|
2290
|
+
# difficult to pronounce, foreign words, acronyms, and so on can be pronounced by
|
2291
|
+
# users.
|
2252
2292
|
# * For a word that is not in the service's base vocabulary, omit the parameter to
|
2253
2293
|
# have the service automatically generate a sounds-like pronunciation for the word.
|
2254
2294
|
# * For a word that is in the service's base vocabulary, use the parameter to
|
@@ -2258,6 +2298,10 @@ module IBMWatson
|
|
2258
2298
|
#
|
2259
2299
|
# A word can have at most five sounds-like pronunciations. A pronunciation can
|
2260
2300
|
# include at most 40 characters not including spaces.
|
2301
|
+
#
|
2302
|
+
# _For a custom model that is based on a next-generation model_, omit this field.
|
2303
|
+
# Custom models based on next-generation models do not support the `sounds_like`
|
2304
|
+
# field. The service ignores the field.
|
2261
2305
|
# @param display_as [String] An alternative spelling for the custom word when it appears in a transcript. Use
|
2262
2306
|
# the parameter when you want the word to have a spelling that is different from its
|
2263
2307
|
# usual representation or from its spelling in corpora training data.
|
@@ -2332,11 +2376,12 @@ module IBMWatson
|
|
2332
2376
|
# Delete a custom word.
|
2333
2377
|
# Deletes a custom word from a custom language model. You can remove any word that
|
2334
2378
|
# 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
|
-
#
|
2379
|
+
# also exists in the service's base vocabulary, the service removes the word only
|
2380
|
+
# from the words resource; the word remains in the base vocabulary. Removing a
|
2337
2381
|
# 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.
|
2382
|
+
# [Train a custom language model](#trainlanguagemodel) method. You must use
|
2383
|
+
# credentials for the instance of the service that owns a model to delete its words.
|
2384
|
+
#
|
2340
2385
|
#
|
2341
2386
|
# **See also:** [Deleting a word from a custom language
|
2342
2387
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWords#deleteWord).
|
@@ -2377,7 +2422,11 @@ module IBMWatson
|
|
2377
2422
|
# Lists information about all grammars from a custom language model. The information
|
2378
2423
|
# includes the total number of out-of-vocabulary (OOV) words, name, and status of
|
2379
2424
|
# each grammar. You must use credentials for the instance of the service that owns a
|
2380
|
-
# model to list its grammars.
|
2425
|
+
# model to list its grammars. Grammars are available for all languages and models
|
2426
|
+
# that support language customization.
|
2427
|
+
#
|
2428
|
+
# **Note:** Grammars are supported only for use with previous-generation models.
|
2429
|
+
# They are not supported for next-generation models.
|
2381
2430
|
#
|
2382
2431
|
# **See also:** [Listing grammars from a custom language
|
2383
2432
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars).
|
@@ -2411,8 +2460,8 @@ module IBMWatson
|
|
2411
2460
|
# UTF-8 format that defines the grammar. Use multiple requests to submit multiple
|
2412
2461
|
# grammar files. You must use credentials for the instance of the service that owns
|
2413
2462
|
# 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
|
2463
|
+
# language model until you train the model for the new data by using the [Train a
|
2464
|
+
# custom language model](#trainlanguagemodel) method.
|
2416
2465
|
#
|
2417
2466
|
# The call returns an HTTP 201 response code if the grammar is valid. The service
|
2418
2467
|
# then asynchronously processes the contents of the grammar and automatically
|
@@ -2420,27 +2469,33 @@ module IBMWatson
|
|
2420
2469
|
# to complete depending on the size and complexity of the grammar, as well as the
|
2421
2470
|
# current load on the service. You cannot submit requests to add additional
|
2422
2471
|
# 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.
|
2472
|
+
# of the grammar for the current request completes. Use the [Get a
|
2473
|
+
# grammar](#getgrammar) method to check the status of the analysis.
|
2425
2474
|
#
|
2426
2475
|
# The service populates the model's words resource with any word that is recognized
|
2427
2476
|
# by the grammar that is not found in the model's base vocabulary. These are
|
2428
|
-
# referred to as out-of-vocabulary (OOV) words. You can use the
|
2429
|
-
# words
|
2430
|
-
# to eliminate typos and modify how words are pronounced as
|
2477
|
+
# referred to as out-of-vocabulary (OOV) words. You can use the [List custom
|
2478
|
+
# words](#listwords) method to examine the words resource and use other
|
2479
|
+
# words-related methods to eliminate typos and modify how words are pronounced as
|
2480
|
+
# needed.
|
2431
2481
|
#
|
2432
2482
|
# To add a grammar that has the same name as an existing grammar, set the
|
2433
2483
|
# `allow_overwrite` parameter to `true`; otherwise, the request fails. Overwriting
|
2434
2484
|
# an existing grammar causes the service to process the grammar file and extract OOV
|
2435
2485
|
# words anew. Before doing so, it removes any OOV words associated with the existing
|
2436
2486
|
# 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
|
-
#
|
2487
|
+
# resource or they have been modified in some way with the [Add custom
|
2488
|
+
# words](#addwords) or [Add a custom word](#addword) method.
|
2439
2489
|
#
|
2440
2490
|
# The service limits the overall amount of data that you can add to a custom model
|
2441
2491
|
# to a maximum of 10 million total words from all sources combined. Also, you can
|
2442
2492
|
# add no more than 90 thousand OOV words to a model. This includes words that the
|
2443
2493
|
# service extracts from corpora and grammars and words that you add directly.
|
2494
|
+
# Grammars are available for all languages and models that support language
|
2495
|
+
# customization.
|
2496
|
+
#
|
2497
|
+
# **Note:** Grammars are supported only for use with previous-generation models.
|
2498
|
+
# They are not supported for next-generation models.
|
2444
2499
|
#
|
2445
2500
|
# **See also:**
|
2446
2501
|
# * [Understanding
|
@@ -2523,7 +2578,11 @@ module IBMWatson
|
|
2523
2578
|
# Gets information about a grammar from a custom language model. The information
|
2524
2579
|
# includes the total number of out-of-vocabulary (OOV) words, name, and status of
|
2525
2580
|
# the grammar. You must use credentials for the instance of the service that owns a
|
2526
|
-
# model to list its grammars.
|
2581
|
+
# model to list its grammars. Grammars are available for all languages and models
|
2582
|
+
# that support language customization.
|
2583
|
+
#
|
2584
|
+
# **Note:** Grammars are supported only for use with previous-generation models.
|
2585
|
+
# They are not supported for next-generation models.
|
2527
2586
|
#
|
2528
2587
|
# **See also:** [Listing grammars from a custom language
|
2529
2588
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars).
|
@@ -2559,10 +2618,15 @@ module IBMWatson
|
|
2559
2618
|
# Deletes an existing grammar from a custom language model. The service removes any
|
2560
2619
|
# out-of-vocabulary (OOV) words associated with the grammar from the custom model's
|
2561
2620
|
# words resource unless they were also added by another resource or they were
|
2562
|
-
# modified in some way with the
|
2563
|
-
# method. Removing a grammar does not affect the custom model until
|
2564
|
-
# model with the
|
2565
|
-
# for the instance of the service that owns a model
|
2621
|
+
# modified in some way with the [Add custom words](#addwords) or [Add a custom
|
2622
|
+
# word](#addword) method. Removing a grammar does not affect the custom model until
|
2623
|
+
# you train the model with the [Train a custom language model](#trainlanguagemodel)
|
2624
|
+
# method. You must use credentials for the instance of the service that owns a model
|
2625
|
+
# to delete its grammar. Grammars are available for all languages and models that
|
2626
|
+
# support language customization.
|
2627
|
+
#
|
2628
|
+
# **Note:** Grammars are supported only for use with previous-generation models.
|
2629
|
+
# They are not supported for next-generation models.
|
2566
2630
|
#
|
2567
2631
|
# **See also:** [Deleting a grammar from a custom language
|
2568
2632
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#deleteGrammar).
|
@@ -2608,6 +2672,9 @@ module IBMWatson
|
|
2608
2672
|
# do not lose any models, but you cannot create any more until your model count is
|
2609
2673
|
# below the limit.
|
2610
2674
|
#
|
2675
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2676
|
+
# previous-generation models. It is not supported for next-generation models.
|
2677
|
+
#
|
2611
2678
|
# **See also:** [Create a custom acoustic
|
2612
2679
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#createModel-acoustic).
|
2613
2680
|
# @param name [String] A user-defined name for the new custom acoustic model. Use a name that is unique
|
@@ -2622,7 +2689,7 @@ module IBMWatson
|
|
2622
2689
|
#
|
2623
2690
|
# To determine whether a base model supports acoustic model customization, refer to
|
2624
2691
|
# [Language support for
|
2625
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
2692
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
|
2626
2693
|
# @param description [String] A description of the new custom acoustic model. Use a localized description that
|
2627
2694
|
# matches the language of the custom model.
|
2628
2695
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2663,6 +2730,9 @@ module IBMWatson
|
|
2663
2730
|
# all languages. You must use credentials for the instance of the service that owns
|
2664
2731
|
# a model to list information about it.
|
2665
2732
|
#
|
2733
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2734
|
+
# previous-generation models. It is not supported for next-generation models.
|
2735
|
+
#
|
2666
2736
|
# **See also:** [Listing custom acoustic
|
2667
2737
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#listModels-acoustic).
|
2668
2738
|
# @param language [String] The identifier of the language for which custom language or custom acoustic models
|
@@ -2672,7 +2742,7 @@ module IBMWatson
|
|
2672
2742
|
#
|
2673
2743
|
# To determine the languages for which customization is available, see [Language
|
2674
2744
|
# support for
|
2675
|
-
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-
|
2745
|
+
# customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support).
|
2676
2746
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2677
2747
|
def list_acoustic_models(language: nil)
|
2678
2748
|
headers = {
|
@@ -2702,6 +2772,9 @@ module IBMWatson
|
|
2702
2772
|
# Gets information about a specified custom acoustic model. You must use credentials
|
2703
2773
|
# for the instance of the service that owns a model to list information about it.
|
2704
2774
|
#
|
2775
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2776
|
+
# previous-generation models. It is not supported for next-generation models.
|
2777
|
+
#
|
2705
2778
|
# **See also:** [Listing custom acoustic
|
2706
2779
|
# models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#listModels-acoustic).
|
2707
2780
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2735,6 +2808,9 @@ module IBMWatson
|
|
2735
2808
|
# processed. You must use credentials for the instance of the service that owns a
|
2736
2809
|
# model to delete it.
|
2737
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
|
+
#
|
2738
2814
|
# **See also:** [Deleting a custom acoustic
|
2739
2815
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#deleteModel-acoustic).
|
2740
2816
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2779,14 +2855,14 @@ module IBMWatson
|
|
2779
2855
|
# audio. The method returns an HTTP 200 response code to indicate that the training
|
2780
2856
|
# process has begun.
|
2781
2857
|
#
|
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.
|
2858
|
+
# You can monitor the status of the training by using the [Get a custom acoustic
|
2859
|
+
# model](#getacousticmodel) method to poll the model's status. Use a loop to check
|
2860
|
+
# the status once a minute. The method returns an `AcousticModel` object that
|
2861
|
+
# includes `status` and `progress` fields. A status of `available` indicates that
|
2862
|
+
# the custom model is trained and ready to use. The service cannot train a model
|
2863
|
+
# while it is handling another request for the model. The service cannot accept
|
2864
|
+
# subsequent training requests, or requests to add new audio resources, until the
|
2865
|
+
# existing training request completes.
|
2790
2866
|
#
|
2791
2867
|
# You can use the optional `custom_language_model_id` parameter to specify the GUID
|
2792
2868
|
# of a separately created custom language model that is to be used during training.
|
@@ -2797,6 +2873,9 @@ module IBMWatson
|
|
2797
2873
|
# same version of the same base model, and the custom language model must be fully
|
2798
2874
|
# trained and available.
|
2799
2875
|
#
|
2876
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2877
|
+
# previous-generation models. It is not supported for next-generation models.
|
2878
|
+
#
|
2800
2879
|
# **See also:**
|
2801
2880
|
# * [Train the custom acoustic
|
2802
2881
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#trainModel-acoustic)
|
@@ -2868,6 +2947,9 @@ module IBMWatson
|
|
2868
2947
|
# request completes. You must use credentials for the instance of the service that
|
2869
2948
|
# owns a model to reset it.
|
2870
2949
|
#
|
2950
|
+
# **Note:** Acoustic model customization is supported only for use with
|
2951
|
+
# previous-generation models. It is not supported for next-generation models.
|
2952
|
+
#
|
2871
2953
|
# **See also:** [Resetting a custom acoustic
|
2872
2954
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#resetModel-acoustic).
|
2873
2955
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2906,14 +2988,14 @@ module IBMWatson
|
|
2906
2988
|
#
|
2907
2989
|
# The method returns an HTTP 200 response code to indicate that the upgrade process
|
2908
2990
|
# 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. While it is being
|
2912
|
-
# custom model has the status `upgrading`. When the upgrade is
|
2913
|
-
# resumes the status that it had prior to upgrade. The service
|
2914
|
-
# model while it is handling another request for the model. The
|
2915
|
-
# accept subsequent requests for the model until the existing upgrade
|
2916
|
-
# completes.
|
2991
|
+
# [Get a custom acoustic model](#getacousticmodel) method to poll the model's
|
2992
|
+
# status. The method returns an `AcousticModel` object that includes `status` and
|
2993
|
+
# `progress` fields. Use a loop to check the status once a minute. While it is being
|
2994
|
+
# upgraded, the custom model has the status `upgrading`. When the upgrade is
|
2995
|
+
# complete, the model resumes the status that it had prior to upgrade. The service
|
2996
|
+
# cannot upgrade a model while it is handling another request for the model. The
|
2997
|
+
# service cannot accept subsequent requests for the model until the existing upgrade
|
2998
|
+
# request completes.
|
2917
2999
|
#
|
2918
3000
|
# If the custom acoustic model was trained with a separately created custom language
|
2919
3001
|
# model, you must use the `custom_language_model_id` parameter to specify the GUID
|
@@ -2921,6 +3003,9 @@ module IBMWatson
|
|
2921
3003
|
# the custom acoustic model can be upgraded. Omit the parameter if the custom
|
2922
3004
|
# acoustic model was not trained with a custom language model.
|
2923
3005
|
#
|
3006
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3007
|
+
# previous-generation models. It is not supported for next-generation models.
|
3008
|
+
#
|
2924
3009
|
# **See also:** [Upgrading a custom acoustic
|
2925
3010
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-acoustic).
|
2926
3011
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -2976,6 +3061,9 @@ module IBMWatson
|
|
2976
3061
|
# to a request to add it to the custom acoustic model. You must use credentials for
|
2977
3062
|
# the instance of the service that owns a model to list its audio resources.
|
2978
3063
|
#
|
3064
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3065
|
+
# previous-generation models. It is not supported for next-generation models.
|
3066
|
+
#
|
2979
3067
|
# **See also:** [Listing audio resources for a custom acoustic
|
2980
3068
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#listAudio).
|
2981
3069
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -3008,8 +3096,8 @@ module IBMWatson
|
|
3008
3096
|
# the acoustic characteristics of the audio that you plan to transcribe. You must
|
3009
3097
|
# use credentials for the instance of the service that owns a model to add an audio
|
3010
3098
|
# 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
|
3099
|
+
# you train the model for the new data by using the [Train a custom acoustic
|
3100
|
+
# model](#trainacousticmodel) method.
|
3013
3101
|
#
|
3014
3102
|
# You can add individual audio files or an archive file that contains multiple audio
|
3015
3103
|
# files. Adding multiple audio files via a single archive file is significantly more
|
@@ -3034,11 +3122,14 @@ module IBMWatson
|
|
3034
3122
|
# upgrade the model until the service's analysis of all audio resources for current
|
3035
3123
|
# requests completes.
|
3036
3124
|
#
|
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`.
|
3125
|
+
# To determine the status of the service's analysis of the audio, use the [Get an
|
3126
|
+
# audio resource](#getaudio) method to poll the status of the audio. The method
|
3127
|
+
# accepts the customization ID of the custom model and the name of the audio
|
3128
|
+
# resource, and it returns the status of the resource. Use a loop to check the
|
3129
|
+
# status of the audio every few seconds until it becomes `ok`.
|
3130
|
+
#
|
3131
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3132
|
+
# previous-generation models. It is not supported for next-generation models.
|
3042
3133
|
#
|
3043
3134
|
# **See also:** [Add audio to the custom acoustic
|
3044
3135
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#addAudio).
|
@@ -3133,7 +3224,7 @@ module IBMWatson
|
|
3133
3224
|
# For an archive-type resource, the media type of the archive file. For more
|
3134
3225
|
# information, see **Content types for archive-type resources** in the method
|
3135
3226
|
# description.
|
3136
|
-
# @param contained_content_type [String]
|
3227
|
+
# @param contained_content_type [String] _For an archive-type resource_, specify the format of the audio files that are
|
3137
3228
|
# contained in the archive file if they are of type `audio/alaw`, `audio/basic`,
|
3138
3229
|
# `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and `endianness`
|
3139
3230
|
# parameters where necessary. In this case, all audio files that are contained in
|
@@ -3147,7 +3238,7 @@ module IBMWatson
|
|
3147
3238
|
# speech recognition. For more information, see **Content types for audio-type
|
3148
3239
|
# resources** in the method description.
|
3149
3240
|
#
|
3150
|
-
#
|
3241
|
+
# _For an audio-type resource_, omit the header.
|
3151
3242
|
# @param allow_overwrite [Boolean] If `true`, the specified audio resource overwrites an existing audio resource with
|
3152
3243
|
# the same name. If `false`, the request fails if an audio resource with the same
|
3153
3244
|
# name already exists. The parameter has no effect if an audio resource with the
|
@@ -3192,9 +3283,9 @@ module IBMWatson
|
|
3192
3283
|
# Gets information about an audio resource from a custom acoustic model. The method
|
3193
3284
|
# returns an `AudioListing` object whose fields depend on the type of audio resource
|
3194
3285
|
# that you specify with the method's `audio_name` parameter:
|
3195
|
-
# *
|
3286
|
+
# * _For an audio-type resource_, the object's fields match those of an
|
3196
3287
|
# `AudioResource` object: `duration`, `name`, `details`, and `status`.
|
3197
|
-
# *
|
3288
|
+
# * _For an archive-type resource_, the object includes a `container` field whose
|
3198
3289
|
# fields match those of an `AudioResource` object. It also includes an `audio`
|
3199
3290
|
# field, which contains an array of `AudioResource` objects that provides
|
3200
3291
|
# information about the audio files that are contained in the archive.
|
@@ -3202,14 +3293,17 @@ module IBMWatson
|
|
3202
3293
|
# The information includes the status of the specified audio resource. The status is
|
3203
3294
|
# important for checking the service's analysis of a resource that you add to the
|
3204
3295
|
# custom model.
|
3205
|
-
# *
|
3206
|
-
# object.
|
3207
|
-
# *
|
3296
|
+
# * _For an audio-type resource_, the `status` field is located in the
|
3297
|
+
# `AudioListing` object.
|
3298
|
+
# * _For an archive-type resource_, the `status` field is located in the
|
3208
3299
|
# `AudioResource` object that is returned in the `container` field.
|
3209
3300
|
#
|
3210
3301
|
# You must use credentials for the instance of the service that owns a model to list
|
3211
3302
|
# its audio resources.
|
3212
3303
|
#
|
3304
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3305
|
+
# previous-generation models. It is not supported for next-generation models.
|
3306
|
+
#
|
3213
3307
|
# **See also:** [Listing audio resources for a custom acoustic
|
3214
3308
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#listAudio).
|
3215
3309
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model that is to be used for
|
@@ -3246,10 +3340,14 @@ module IBMWatson
|
|
3246
3340
|
# not allow deletion of individual files from an archive resource.
|
3247
3341
|
#
|
3248
3342
|
# 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
|
3343
|
+
# model on its updated data by using the [Train a custom acoustic
|
3344
|
+
# model](#trainacousticmodel) method. You can delete an existing audio resource from
|
3345
|
+
# a model while a different resource is being added to the model. You must use
|
3346
|
+
# credentials for the instance of the service that owns a model to delete its audio
|
3347
|
+
# resources.
|
3348
|
+
#
|
3349
|
+
# **Note:** Acoustic model customization is supported only for use with
|
3350
|
+
# previous-generation models. It is not supported for next-generation models.
|
3253
3351
|
#
|
3254
3352
|
# **See also:** [Deleting an audio resource from a custom acoustic
|
3255
3353
|
# model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAudio#deleteAudio).
|