ibm_watson 0.7.0 → 0.8.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/lib/ibm_watson/discovery_v1.rb +165 -146
- data/lib/ibm_watson/personality_insights_v3.rb +6 -6
- data/lib/ibm_watson/speech_to_text_v1.rb +240 -126
- data/lib/ibm_watson/text_to_speech_v1.rb +115 -54
- data/lib/ibm_watson/tone_analyzer_v3.rb +7 -3
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +0 -2
- data/lib/ibm_watson/watson_service.rb +0 -1
- data/test/integration/test_discovery_v1.rb +2 -1
- data/test/unit/test_discovery_v1.rb +6 -3
- metadata +2 -2
@@ -126,12 +126,12 @@ module IBMWatson
|
|
126
126
|
# to indicate the character encoding of the input text; for example: `Content-Type:
|
127
127
|
# text/plain;charset=utf-8`.
|
128
128
|
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
# profile](https://console.bluemix.net/docs/services/personality-insights/input.html)
|
132
|
-
# [Understanding a JSON
|
133
|
-
# profile](https://console.bluemix.net/docs/services/personality-insights/output.html)
|
134
|
-
#
|
129
|
+
# **See also:**
|
130
|
+
# * [Requesting a
|
131
|
+
# profile](https://console.bluemix.net/docs/services/personality-insights/input.html)
|
132
|
+
# * [Understanding a JSON
|
133
|
+
# profile](https://console.bluemix.net/docs/services/personality-insights/output.html)
|
134
|
+
# * [Understanding a CSV
|
135
135
|
# profile](https://console.bluemix.net/docs/services/personality-insights/output-csv.html).
|
136
136
|
# @param content [Content] A maximum of 20 MB of content to analyze, though the service requires much less
|
137
137
|
# text; for more information, see [Providing sufficient
|
@@ -14,58 +14,25 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
# The IBM® Speech to Text service provides
|
17
|
+
# The IBM® Speech to Text service provides APIs that use IBM's speech-recognition
|
18
18
|
# capabilities to produce transcripts of spoken audio. The service can transcribe speech
|
19
19
|
# from various languages and audio formats. It addition to basic transcription, the
|
20
20
|
# service can produce detailed information about many different aspects of the audio. For
|
21
21
|
# most languages, the service supports two sampling rates, broadband and narrowband. It
|
22
22
|
# returns all JSON response content in the UTF-8 character set.
|
23
23
|
#
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# For speech recognition, the service supports synchronous and asynchronous HTTP
|
25
|
+
# Representational State Transfer (REST) interfaces. It also supports a WebSocket
|
26
|
+
# interface that provides a full-duplex, low-latency communication channel: Clients send
|
27
|
+
# requests and audio to the service and receive results over a single connection in an
|
28
|
+
# asynchronous fashion.
|
26
29
|
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# registered callbacks and polling for non-blocking recognition. See [The HTTP
|
34
|
-
# interface](https://console.bluemix.net/docs/services/speech-to-text/http.html) and [The
|
35
|
-
# asynchronous HTTP
|
36
|
-
# interface](https://console.bluemix.net/docs/services/speech-to-text/async.html).
|
37
|
-
# * **WebSocket interface:** The service also offers a WebSocket interface for speech
|
38
|
-
# recognition. The WebSocket interface provides a full-duplex, low-latency communication
|
39
|
-
# channel. Clients send requests and audio to the service and receive results over a
|
40
|
-
# single connection in an asynchronous fashion. See [The WebSocket
|
41
|
-
# interface](https://console.bluemix.net/docs/services/speech-to-text/websockets.html).
|
42
|
-
# * **Customization:** The service offers two customization interfaces. Use language model
|
43
|
-
# customization to expand the vocabulary of a base model with domain-specific terminology.
|
44
|
-
# Use acoustic model customization to adapt a base model for the acoustic characteristics
|
45
|
-
# of your audio. Language model customization is generally available for production use by
|
46
|
-
# most supported languages; acoustic model customization is beta functionality that is
|
47
|
-
# available for all supported languages. See [The customization
|
48
|
-
# interface](https://console.bluemix.net/docs/services/speech-to-text/custom.html).
|
49
|
-
# * **Customization IDs:** Many methods accept a customization ID to identify a custom
|
50
|
-
# language or custom acoustic model. Customization IDs are Globally Unique Identifiers
|
51
|
-
# (GUIDs). They are hexadecimal strings that have the format
|
52
|
-
# `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`.
|
53
|
-
# * **`X-Watson-Learning-Opt-Out`:** By default, all Watson services log requests and
|
54
|
-
# their results. Logging is done only to improve the services for future users. The logged
|
55
|
-
# data is not shared or made public. To prevent IBM from accessing your data for general
|
56
|
-
# service improvements, set the `X-Watson-Learning-Opt-Out` request header to `true` for
|
57
|
-
# all requests. You must set the header on each request that you do not want IBM to access
|
58
|
-
# for general service improvements.
|
59
|
-
#
|
60
|
-
# Methods of the customization interface do not log corpora, words, and audio resources
|
61
|
-
# that you use to build custom models. Your training data is never used to improve the
|
62
|
-
# service's base models. However, the service does log such data when a custom model is
|
63
|
-
# used with a recognition request. You must set the `X-Watson-Learning-Opt-Out` request
|
64
|
-
# header to `true` to prevent IBM from accessing the data to improve the service.
|
65
|
-
# * **`X-Watson-Metadata`**: This header allows you to associate a customer ID with data
|
66
|
-
# that is passed with a request. If necessary, you can use the **Delete labeled data**
|
67
|
-
# method to delete the data for a customer ID. See [Information
|
68
|
-
# security](https://console.bluemix.net/docs/services/speech-to-text/information-security.html).
|
30
|
+
# The service also offers two customization interfaces. Use language model customization
|
31
|
+
# to expand the vocabulary of a base model with domain-specific terminology. Use acoustic
|
32
|
+
# model customization to adapt a base model for the acoustic characteristics of your
|
33
|
+
# audio. Language model customization is generally available for production use with most
|
34
|
+
# supported languages; acoustic model customization is beta functionality that is
|
35
|
+
# available for all supported languages.
|
69
36
|
|
70
37
|
require "concurrent"
|
71
38
|
require "erb"
|
@@ -131,6 +98,9 @@ module IBMWatson
|
|
131
98
|
# Lists all language models that are available for use with the service. The
|
132
99
|
# information includes the name of the model and its minimum sampling rate in Hertz,
|
133
100
|
# among other things.
|
101
|
+
#
|
102
|
+
# **See also:** [Languages and
|
103
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#models).
|
134
104
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
135
105
|
def list_models
|
136
106
|
headers = {
|
@@ -151,6 +121,9 @@ module IBMWatson
|
|
151
121
|
# Gets information for a single specified language model that is available for use
|
152
122
|
# with the service. The information includes the name of the model and its minimum
|
153
123
|
# sampling rate in Hertz, among other things.
|
124
|
+
#
|
125
|
+
# **See also:** [Languages and
|
126
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#models).
|
154
127
|
# @param model_id [String] The identifier of the model in the form of its name from the output of the **Get
|
155
128
|
# models** method.
|
156
129
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
@@ -182,6 +155,10 @@ module IBMWatson
|
|
182
155
|
# downmixes the audio to one-channel mono during transcoding. (For the `audio/l16`
|
183
156
|
# format, you can specify the endianness.)
|
184
157
|
#
|
158
|
+
# **See also:** [Making a basic HTTP
|
159
|
+
# request](https://console.bluemix.net/docs/services/speech-to-text/http.html#HTTP-basic).
|
160
|
+
#
|
161
|
+
#
|
185
162
|
# ### Streaming mode
|
186
163
|
#
|
187
164
|
# For requests to transcribe live audio as it becomes available, you must set the
|
@@ -192,10 +169,18 @@ module IBMWatson
|
|
192
169
|
# `inactivity_timeout` seconds of audio (not processing time); use the
|
193
170
|
# `inactivity_timeout` parameter to change the default of 30 seconds.
|
194
171
|
#
|
172
|
+
# **See also:**
|
173
|
+
# * [Audio
|
174
|
+
# transmission](https://console.bluemix.net/docs/services/speech-to-text/input.html#transmission)
|
175
|
+
# *
|
176
|
+
# [Timeouts](https://console.bluemix.net/docs/services/speech-to-text/input.html#timeouts).
|
177
|
+
#
|
178
|
+
#
|
195
179
|
# ### Audio formats (content types)
|
196
180
|
#
|
197
181
|
# Use the `Content-Type` header to specify the audio format (MIME type) of the
|
198
|
-
# audio. The service accepts the following formats
|
182
|
+
# audio. The service accepts the following formats, including specifying the
|
183
|
+
# sampling rate, channels, and endianness where indicated.
|
199
184
|
# * `audio/basic` (Use only with narrowband models.)
|
200
185
|
# * `audio/flac`
|
201
186
|
# * `audio/l16` (Specify the sampling rate (`rate`) and optionally the number of
|
@@ -211,8 +196,7 @@ module IBMWatson
|
|
211
196
|
# * `audio/webm;codecs=opus`
|
212
197
|
# * `audio/webm;codecs=vorbis`
|
213
198
|
#
|
214
|
-
#
|
215
|
-
# sampling rate, channels, and endianness for the indicated formats, see [Audio
|
199
|
+
# **See also:** [Audio
|
216
200
|
# formats](https://console.bluemix.net/docs/services/speech-to-text/audio-formats.html).
|
217
201
|
#
|
218
202
|
#
|
@@ -228,7 +212,7 @@ module IBMWatson
|
|
228
212
|
# limit imposed by most HTTP servers and proxies. You can encounter this limit, for
|
229
213
|
# example, if you want to spot a very large number of keywords.
|
230
214
|
#
|
231
|
-
#
|
215
|
+
# **See also:** [Making a multipart HTTP
|
232
216
|
# request](https://console.bluemix.net/docs/services/speech-to-text/http.html#HTTP-multi).
|
233
217
|
# @param audio [String] The audio to transcribe in the format specified by the `Content-Type` header.
|
234
218
|
# @param content_type [String] The type of the input.
|
@@ -237,18 +221,19 @@ module IBMWatson
|
|
237
221
|
# recognition request. The base model of the specified custom language model must
|
238
222
|
# match the model specified with the `model` parameter. You must make the request
|
239
223
|
# with service credentials created for the instance of the service that owns the
|
240
|
-
# custom model. By default, no custom language model is used.
|
224
|
+
# custom model. By default, no custom language model is used. See [Custom
|
225
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
241
226
|
# @param acoustic_customization_id [String] The customization ID (GUID) of a custom acoustic model that is to be used with the
|
242
227
|
# recognition request. The base model of the specified custom acoustic model must
|
243
228
|
# match the model specified with the `model` parameter. You must make the request
|
244
229
|
# with service credentials created for the instance of the service that owns the
|
245
|
-
# custom model. By default, no custom acoustic model is used.
|
230
|
+
# custom model. By default, no custom acoustic model is used. See [Custom
|
231
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
246
232
|
# @param base_model_version [String] The version of the specified base model that is to be used with recognition
|
247
233
|
# request. Multiple versions of a base model can exist when a model is updated for
|
248
234
|
# internal improvements. The parameter is intended primarily for use with custom
|
249
235
|
# models that have been upgraded for a new base model. The default value depends on
|
250
|
-
# whether the parameter is used with or without a custom model.
|
251
|
-
# information, see [Base model
|
236
|
+
# whether the parameter is used with or without a custom model. See [Base model
|
252
237
|
# version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
|
253
238
|
# @param customization_weight [Float] If you specify the customization ID (GUID) of a custom language model with the
|
254
239
|
# recognition request, the customization weight tells the service how much weight to
|
@@ -265,49 +250,60 @@ module IBMWatson
|
|
265
250
|
# setting the weight: a higher value can improve the accuracy of phrases from the
|
266
251
|
# custom model's domain, but it can negatively affect performance on non-domain
|
267
252
|
# phrases.
|
253
|
+
#
|
254
|
+
# See [Custom
|
255
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
268
256
|
# @param inactivity_timeout [Fixnum] The time in seconds after which, if only silence (no speech) is detected in
|
269
257
|
# submitted audio, the connection is closed with a 400 error. The parameter is
|
270
258
|
# useful for stopping audio submission from a live microphone when a user simply
|
271
|
-
# walks away. Use `-1` for infinity.
|
259
|
+
# walks away. Use `-1` for infinity. See
|
260
|
+
# [Timeouts](https://console.bluemix.net/docs/services/speech-to-text/input.html#timeouts).
|
272
261
|
# @param keywords [Array[String]] An array of keyword strings to spot in the audio. Each keyword string can include
|
273
262
|
# one or more string tokens. Keywords are spotted only in the final results, not in
|
274
263
|
# interim hypotheses. If you specify any keywords, you must also specify a keywords
|
275
264
|
# threshold. You can spot a maximum of 1000 keywords. Omit the parameter or specify
|
276
|
-
# an empty array if you do not need to spot keywords.
|
265
|
+
# an empty array if you do not need to spot keywords. See [Keyword
|
266
|
+
# spotting](https://console.bluemix.net/docs/services/speech-to-text/output.html#keyword_spotting).
|
277
267
|
# @param keywords_threshold [Float] A confidence value that is the lower bound for spotting a keyword. A word is
|
278
268
|
# considered to match a keyword if its confidence is greater than or equal to the
|
279
269
|
# threshold. Specify a probability between 0.0 and 1.0. No keyword spotting is
|
280
270
|
# performed if you omit the parameter. If you specify a threshold, you must also
|
281
|
-
# specify one or more keywords.
|
271
|
+
# specify one or more keywords. See [Keyword
|
272
|
+
# spotting](https://console.bluemix.net/docs/services/speech-to-text/output.html#keyword_spotting).
|
282
273
|
# @param max_alternatives [Fixnum] The maximum number of alternative transcripts that the service is to return. By
|
283
|
-
# default, a single transcription is returned.
|
274
|
+
# default, a single transcription is returned. See [Maximum
|
275
|
+
# alternatives](https://console.bluemix.net/docs/services/speech-to-text/output.html#max_alternatives).
|
284
276
|
# @param word_alternatives_threshold [Float] A confidence value that is the lower bound for identifying a hypothesis as a
|
285
277
|
# possible word alternative (also known as \"Confusion Networks\"). An alternative
|
286
278
|
# word is considered if its confidence is greater than or equal to the threshold.
|
287
279
|
# Specify a probability between 0.0 and 1.0. No alternative words are computed if
|
288
|
-
# you omit the parameter.
|
280
|
+
# you omit the parameter. See [Word
|
281
|
+
# alternatives](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_alternatives).
|
289
282
|
# @param word_confidence [Boolean] If `true`, the service returns a confidence measure in the range of 0.0 to 1.0 for
|
290
|
-
# each word. By default, no word confidence measures are returned.
|
283
|
+
# each word. By default, no word confidence measures are returned. See [Word
|
284
|
+
# confidence](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_confidence).
|
291
285
|
# @param timestamps [Boolean] If `true`, the service returns time alignment for each word. By default, no
|
292
|
-
# timestamps are returned.
|
286
|
+
# timestamps are returned. See [Word
|
287
|
+
# timestamps](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_timestamps).
|
293
288
|
# @param profanity_filter [Boolean] If `true`, the service filters profanity from all output except for keyword
|
294
289
|
# results by replacing inappropriate words with a series of asterisks. Set the
|
295
290
|
# parameter to `false` to return results with no censoring. Applies to US English
|
296
|
-
# transcription only.
|
291
|
+
# transcription only. See [Profanity
|
292
|
+
# filtering](https://console.bluemix.net/docs/services/speech-to-text/output.html#profanity_filter).
|
297
293
|
# @param smart_formatting [Boolean] If `true`, the service converts dates, times, series of digits and numbers, phone
|
298
294
|
# numbers, currency values, and internet addresses into more readable, conventional
|
299
295
|
# representations in the final transcript of a recognition request. For US English,
|
300
296
|
# the service also converts certain keyword strings to punctuation symbols. By
|
301
297
|
# default, no smart formatting is performed. Applies to US English and Spanish
|
302
|
-
# transcription only.
|
298
|
+
# transcription only. See [Smart
|
299
|
+
# formatting](https://console.bluemix.net/docs/services/speech-to-text/output.html#smart_formatting).
|
303
300
|
# @param speaker_labels [Boolean] If `true`, the response includes labels that identify which words were spoken by
|
304
301
|
# which participants in a multi-person exchange. By default, no speaker labels are
|
305
302
|
# returned. Setting `speaker_labels` to `true` forces the `timestamps` parameter to
|
306
|
-
# be `true`, regardless of whether you specify `false` for the parameter.
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
# You can also refer to [Speaker
|
303
|
+
# be `true`, regardless of whether you specify `false` for the parameter. To
|
304
|
+
# determine whether a language model supports speaker labels, use the **Get models**
|
305
|
+
# method and check that the attribute `speaker_labels` is set to `true`. See
|
306
|
+
# [Speaker
|
311
307
|
# labels](https://console.bluemix.net/docs/services/speech-to-text/output.html#speaker_labels).
|
312
308
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
313
309
|
def recognize(audio:, content_type:, model: nil, customization_id: nil, acoustic_customization_id: nil, base_model_version: nil, customization_weight: nil, inactivity_timeout: nil, keywords: nil, keywords_threshold: nil, max_alternatives: nil, word_alternatives_threshold: nil, word_confidence: nil, timestamps: nil, profanity_filter: nil, smart_formatting: nil, speaker_labels: nil)
|
@@ -521,7 +517,9 @@ module IBMWatson
|
|
521
517
|
#
|
522
518
|
# After you successfully register a callback URL, you can use it with an indefinite
|
523
519
|
# number of recognition requests. You can register a maximum of 20 callback URLS in
|
524
|
-
# a one-hour span of time.
|
520
|
+
# a one-hour span of time.
|
521
|
+
#
|
522
|
+
# **See also:** [Registering a callback
|
525
523
|
# URL](https://console.bluemix.net/docs/services/speech-to-text/async.html#register).
|
526
524
|
# @param callback_url [String] An HTTP or HTTPS URL to which callback notifications are to be sent. To be
|
527
525
|
# white-listed, the URL must successfully echo the challenge string during URL
|
@@ -560,6 +558,9 @@ module IBMWatson
|
|
560
558
|
# Unregisters a callback URL that was previously white-listed with a **Register a
|
561
559
|
# callback** request for use with the asynchronous interface. Once unregistered, the
|
562
560
|
# URL can no longer be used with asynchronous recognition requests.
|
561
|
+
#
|
562
|
+
# **See also:** [Unregistering a callback
|
563
|
+
# URL](https://console.bluemix.net/docs/services/speech-to-text/async.html#unregister).
|
563
564
|
# @param callback_url [String] The callback URL that is to be unregistered.
|
564
565
|
# @return [nil]
|
565
566
|
def unregister_callback(callback_url:)
|
@@ -601,13 +602,10 @@ module IBMWatson
|
|
601
602
|
# The two approaches are not mutually exclusive. You can poll the service for job
|
602
603
|
# status or obtain results from the service manually even if you include a callback
|
603
604
|
# URL. In both cases, you can include the `results_ttl` parameter to specify how
|
604
|
-
# long the results are to remain available after the job is complete.
|
605
|
-
#
|
606
|
-
#
|
607
|
-
#
|
608
|
-
# Using the HTTPS **Check a job** method to retrieve results is more secure than
|
609
|
-
# receiving them via callback notification over HTTP because it provides
|
610
|
-
# confidentiality in addition to authentication and data integrity.
|
605
|
+
# long the results are to remain available after the job is complete. Using the
|
606
|
+
# HTTPS **Check a job** method to retrieve results is more secure than receiving
|
607
|
+
# them via callback notification over HTTP because it provides confidentiality in
|
608
|
+
# addition to authentication and data integrity.
|
611
609
|
#
|
612
610
|
# The method supports the same basic parameters as other HTTP and WebSocket
|
613
611
|
# recognition requests. It also supports the following parameters specific to the
|
@@ -619,13 +617,33 @@ module IBMWatson
|
|
619
617
|
#
|
620
618
|
# The service imposes a data size limit of 100 MB. It automatically detects the
|
621
619
|
# endianness of the incoming audio and, for audio that includes multiple channels,
|
622
|
-
# downmixes the audio to one-channel mono during transcoding.
|
623
|
-
#
|
620
|
+
# downmixes the audio to one-channel mono during transcoding.
|
621
|
+
#
|
622
|
+
# **See also:** [Creating a
|
623
|
+
# job](https://console.bluemix.net/docs/services/speech-to-text/async.html#create).
|
624
|
+
#
|
625
|
+
# ### Streaming mode
|
626
|
+
#
|
627
|
+
# For requests to transcribe live audio as it becomes available, you must set the
|
628
|
+
# `Transfer-Encoding` header to `chunked` to use streaming mode. In streaming mode,
|
629
|
+
# the server closes the connection (status code 408) if the service receives no data
|
630
|
+
# chunk for 30 seconds and it has no audio to transcribe for 30 seconds. The server
|
631
|
+
# also closes the connection (status code 400) if no speech is detected for
|
632
|
+
# `inactivity_timeout` seconds of audio (not processing time); use the
|
633
|
+
# `inactivity_timeout` parameter to change the default of 30 seconds.
|
634
|
+
#
|
635
|
+
# **See also:**
|
636
|
+
# * [Audio
|
637
|
+
# transmission](https://console.bluemix.net/docs/services/speech-to-text/input.html#transmission)
|
638
|
+
# *
|
639
|
+
# [Timeouts](https://console.bluemix.net/docs/services/speech-to-text/input.html#timeouts)
|
640
|
+
#
|
624
641
|
#
|
625
642
|
# ### Audio formats (content types)
|
626
643
|
#
|
627
|
-
# Use the `Content-Type`
|
628
|
-
# audio
|
644
|
+
# Use the `Content-Type` header to specify the audio format (MIME type) of the
|
645
|
+
# audio. The service accepts the following formats, including specifying the
|
646
|
+
# sampling rate, channels, and endianness where indicated.
|
629
647
|
# * `audio/basic` (Use only with narrowband models.)
|
630
648
|
# * `audio/flac`
|
631
649
|
# * `audio/l16` (Specify the sampling rate (`rate`) and optionally the number of
|
@@ -641,8 +659,7 @@ module IBMWatson
|
|
641
659
|
# * `audio/webm;codecs=opus`
|
642
660
|
# * `audio/webm;codecs=vorbis`
|
643
661
|
#
|
644
|
-
#
|
645
|
-
# sampling rate, channels, and endianness for the indicated formats, see [Audio
|
662
|
+
# **See also:** [Audio
|
646
663
|
# formats](https://console.bluemix.net/docs/services/speech-to-text/audio-formats.html).
|
647
664
|
# @param audio [String] The audio to transcribe in the format specified by the `Content-Type` header.
|
648
665
|
# @param content_type [String] The type of the input.
|
@@ -685,18 +702,19 @@ module IBMWatson
|
|
685
702
|
# recognition request. The base model of the specified custom language model must
|
686
703
|
# match the model specified with the `model` parameter. You must make the request
|
687
704
|
# with service credentials created for the instance of the service that owns the
|
688
|
-
# custom model. By default, no custom language model is used.
|
705
|
+
# custom model. By default, no custom language model is used. See [Custom
|
706
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
689
707
|
# @param acoustic_customization_id [String] The customization ID (GUID) of a custom acoustic model that is to be used with the
|
690
708
|
# recognition request. The base model of the specified custom acoustic model must
|
691
709
|
# match the model specified with the `model` parameter. You must make the request
|
692
710
|
# with service credentials created for the instance of the service that owns the
|
693
|
-
# custom model. By default, no custom acoustic model is used.
|
711
|
+
# custom model. By default, no custom acoustic model is used. See [Custom
|
712
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
694
713
|
# @param base_model_version [String] The version of the specified base model that is to be used with recognition
|
695
714
|
# request. Multiple versions of a base model can exist when a model is updated for
|
696
715
|
# internal improvements. The parameter is intended primarily for use with custom
|
697
716
|
# models that have been upgraded for a new base model. The default value depends on
|
698
|
-
# whether the parameter is used with or without a custom model.
|
699
|
-
# information, see [Base model
|
717
|
+
# whether the parameter is used with or without a custom model. See [Base model
|
700
718
|
# version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
|
701
719
|
# @param customization_weight [Float] If you specify the customization ID (GUID) of a custom language model with the
|
702
720
|
# recognition request, the customization weight tells the service how much weight to
|
@@ -713,49 +731,60 @@ module IBMWatson
|
|
713
731
|
# setting the weight: a higher value can improve the accuracy of phrases from the
|
714
732
|
# custom model's domain, but it can negatively affect performance on non-domain
|
715
733
|
# phrases.
|
734
|
+
#
|
735
|
+
# See [Custom
|
736
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
|
716
737
|
# @param inactivity_timeout [Fixnum] The time in seconds after which, if only silence (no speech) is detected in
|
717
738
|
# submitted audio, the connection is closed with a 400 error. The parameter is
|
718
739
|
# useful for stopping audio submission from a live microphone when a user simply
|
719
|
-
# walks away. Use `-1` for infinity.
|
740
|
+
# walks away. Use `-1` for infinity. See
|
741
|
+
# [Timeouts](https://console.bluemix.net/docs/services/speech-to-text/input.html#timeouts).
|
720
742
|
# @param keywords [Array[String]] An array of keyword strings to spot in the audio. Each keyword string can include
|
721
743
|
# one or more string tokens. Keywords are spotted only in the final results, not in
|
722
744
|
# interim hypotheses. If you specify any keywords, you must also specify a keywords
|
723
745
|
# threshold. You can spot a maximum of 1000 keywords. Omit the parameter or specify
|
724
|
-
# an empty array if you do not need to spot keywords.
|
746
|
+
# an empty array if you do not need to spot keywords. See [Keyword
|
747
|
+
# spotting](https://console.bluemix.net/docs/services/speech-to-text/output.html#keyword_spotting).
|
725
748
|
# @param keywords_threshold [Float] A confidence value that is the lower bound for spotting a keyword. A word is
|
726
749
|
# considered to match a keyword if its confidence is greater than or equal to the
|
727
750
|
# threshold. Specify a probability between 0.0 and 1.0. No keyword spotting is
|
728
751
|
# performed if you omit the parameter. If you specify a threshold, you must also
|
729
|
-
# specify one or more keywords.
|
752
|
+
# specify one or more keywords. See [Keyword
|
753
|
+
# spotting](https://console.bluemix.net/docs/services/speech-to-text/output.html#keyword_spotting).
|
730
754
|
# @param max_alternatives [Fixnum] The maximum number of alternative transcripts that the service is to return. By
|
731
|
-
# default, a single transcription is returned.
|
755
|
+
# default, a single transcription is returned. See [Maximum
|
756
|
+
# alternatives](https://console.bluemix.net/docs/services/speech-to-text/output.html#max_alternatives).
|
732
757
|
# @param word_alternatives_threshold [Float] A confidence value that is the lower bound for identifying a hypothesis as a
|
733
758
|
# possible word alternative (also known as \"Confusion Networks\"). An alternative
|
734
759
|
# word is considered if its confidence is greater than or equal to the threshold.
|
735
760
|
# Specify a probability between 0.0 and 1.0. No alternative words are computed if
|
736
|
-
# you omit the parameter.
|
761
|
+
# you omit the parameter. See [Word
|
762
|
+
# alternatives](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_alternatives).
|
737
763
|
# @param word_confidence [Boolean] If `true`, the service returns a confidence measure in the range of 0.0 to 1.0 for
|
738
|
-
# each word. By default, no word confidence measures are returned.
|
764
|
+
# each word. By default, no word confidence measures are returned. See [Word
|
765
|
+
# confidence](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_confidence).
|
739
766
|
# @param timestamps [Boolean] If `true`, the service returns time alignment for each word. By default, no
|
740
|
-
# timestamps are returned.
|
767
|
+
# timestamps are returned. See [Word
|
768
|
+
# timestamps](https://console.bluemix.net/docs/services/speech-to-text/output.html#word_timestamps).
|
741
769
|
# @param profanity_filter [Boolean] If `true`, the service filters profanity from all output except for keyword
|
742
770
|
# results by replacing inappropriate words with a series of asterisks. Set the
|
743
771
|
# parameter to `false` to return results with no censoring. Applies to US English
|
744
|
-
# transcription only.
|
772
|
+
# transcription only. See [Profanity
|
773
|
+
# filtering](https://console.bluemix.net/docs/services/speech-to-text/output.html#profanity_filter).
|
745
774
|
# @param smart_formatting [Boolean] If `true`, the service converts dates, times, series of digits and numbers, phone
|
746
775
|
# numbers, currency values, and internet addresses into more readable, conventional
|
747
776
|
# representations in the final transcript of a recognition request. For US English,
|
748
777
|
# the service also converts certain keyword strings to punctuation symbols. By
|
749
778
|
# default, no smart formatting is performed. Applies to US English and Spanish
|
750
|
-
# transcription only.
|
779
|
+
# transcription only. See [Smart
|
780
|
+
# formatting](https://console.bluemix.net/docs/services/speech-to-text/output.html#smart_formatting).
|
751
781
|
# @param speaker_labels [Boolean] If `true`, the response includes labels that identify which words were spoken by
|
752
782
|
# which participants in a multi-person exchange. By default, no speaker labels are
|
753
783
|
# returned. Setting `speaker_labels` to `true` forces the `timestamps` parameter to
|
754
|
-
# be `true`, regardless of whether you specify `false` for the parameter.
|
755
|
-
#
|
756
|
-
#
|
757
|
-
#
|
758
|
-
# You can also refer to [Speaker
|
784
|
+
# be `true`, regardless of whether you specify `false` for the parameter. To
|
785
|
+
# determine whether a language model supports speaker labels, use the **Get models**
|
786
|
+
# method and check that the attribute `speaker_labels` is set to `true`. See
|
787
|
+
# [Speaker
|
759
788
|
# labels](https://console.bluemix.net/docs/services/speech-to-text/output.html#speaker_labels).
|
760
789
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
761
790
|
def create_job(audio:, content_type:, model: nil, callback_url: nil, events: nil, user_token: nil, results_ttl: nil, customization_id: nil, acoustic_customization_id: nil, base_model_version: nil, customization_weight: nil, inactivity_timeout: nil, keywords: nil, keywords_threshold: nil, max_alternatives: nil, word_alternatives_threshold: nil, word_confidence: nil, timestamps: nil, profanity_filter: nil, smart_formatting: nil, speaker_labels: nil)
|
@@ -811,6 +840,9 @@ module IBMWatson
|
|
811
840
|
# **Check a job** method. A job and its results remain available until you delete
|
812
841
|
# them with the **Delete a job** method or until the job's time to live expires,
|
813
842
|
# whichever comes first.
|
843
|
+
#
|
844
|
+
# **See also:** [Checking the status of the latest
|
845
|
+
# jobs](https://console.bluemix.net/docs/services/speech-to-text/async.html#jobs).
|
814
846
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
815
847
|
def check_jobs
|
816
848
|
headers = {
|
@@ -837,7 +869,10 @@ module IBMWatson
|
|
837
869
|
# it was submitted with a callback URL and the `recognitions.completed_with_results`
|
838
870
|
# event, and you can retrieve the results multiple times for as long as they remain
|
839
871
|
# available. Use the **Check jobs** method to request information about the most
|
840
|
-
# recent jobs associated with the
|
872
|
+
# recent jobs associated with the caller.
|
873
|
+
#
|
874
|
+
# **See also:** [Checking the status and retrieving the results of a
|
875
|
+
# job](https://console.bluemix.net/docs/services/speech-to-text/async.html#job).
|
841
876
|
# @param id [String] The ID of the asynchronous job.
|
842
877
|
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
|
843
878
|
def check_job(id:)
|
@@ -863,6 +898,9 @@ module IBMWatson
|
|
863
898
|
# service automatically deletes a job and its results when the time to live for the
|
864
899
|
# results expires. You must submit the request with the service credentials of the
|
865
900
|
# user who created the job.
|
901
|
+
#
|
902
|
+
# **See also:** [Deleting a
|
903
|
+
# job](https://console.bluemix.net/docs/services/speech-to-text/async.html#delete).
|
866
904
|
# @param id [String] The ID of the asynchronous job.
|
867
905
|
# @return [nil]
|
868
906
|
def delete_job(id:)
|
@@ -890,6 +928,9 @@ module IBMWatson
|
|
890
928
|
# language model can be used only with the base model for which it is created. The
|
891
929
|
# model is owned by the instance of the service whose credentials are used to create
|
892
930
|
# it.
|
931
|
+
#
|
932
|
+
# **See also:** [Create a custom language
|
933
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html#createModel).
|
893
934
|
# @param name [String] A user-defined name for the new custom language model. Use a name that is unique
|
894
935
|
# among all custom language models that you own. Use a localized name that matches
|
895
936
|
# the language of the custom model. Use a name that describes the domain of the
|
@@ -947,6 +988,9 @@ module IBMWatson
|
|
947
988
|
# the specified language. Omit the parameter to see all custom language models for
|
948
989
|
# all languages. You must use credentials for the instance of the service that owns
|
949
990
|
# a model to list information about it.
|
991
|
+
#
|
992
|
+
# **See also:** [Listing custom language
|
993
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/language-models.html#listModels).
|
950
994
|
# @param language [String] The identifier of the language for which custom language or custom acoustic models
|
951
995
|
# are to be returned (for example, `en-US`). Omit the parameter to see all custom
|
952
996
|
# language or custom acoustic models owned by the requesting service credentials.
|
@@ -973,6 +1017,9 @@ module IBMWatson
|
|
973
1017
|
# Get a custom language model.
|
974
1018
|
# Gets information about a specified custom language model. You must use credentials
|
975
1019
|
# for the instance of the service that owns a model to list information about it.
|
1020
|
+
#
|
1021
|
+
# **See also:** [Listing custom language
|
1022
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/language-models.html#listModels).
|
976
1023
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
977
1024
|
# request with service credentials created for the instance of the service that owns
|
978
1025
|
# the custom model.
|
@@ -999,6 +1046,9 @@ module IBMWatson
|
|
999
1046
|
# another request, such as adding a corpus to the model, is currently being
|
1000
1047
|
# processed. You must use credentials for the instance of the service that owns a
|
1001
1048
|
# model to delete it.
|
1049
|
+
#
|
1050
|
+
# **See also:** [Deleting a custom language
|
1051
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-models.html#deleteModel).
|
1002
1052
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1003
1053
|
# request with service credentials created for the instance of the service that owns
|
1004
1054
|
# the custom model.
|
@@ -1047,6 +1097,9 @@ module IBMWatson
|
|
1047
1097
|
# * No training data (corpora or words) have been added to the custom model.
|
1048
1098
|
# * One or more words that were added to the custom model have invalid sounds-like
|
1049
1099
|
# pronunciations that you must fix.
|
1100
|
+
#
|
1101
|
+
# **See also:** [Train the custom language
|
1102
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html#trainModel).
|
1050
1103
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1051
1104
|
# request with service credentials created for the instance of the service that owns
|
1052
1105
|
# the custom model.
|
@@ -1099,6 +1152,9 @@ module IBMWatson
|
|
1099
1152
|
# first created. Metadata such as the name and language of the model are preserved,
|
1100
1153
|
# but the model's words resource is removed and must be re-created. You must use
|
1101
1154
|
# credentials for the instance of the service that owns a model to reset it.
|
1155
|
+
#
|
1156
|
+
# **See also:** [Resetting a custom language
|
1157
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-models.html#resetModel).
|
1102
1158
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1103
1159
|
# request with service credentials created for the instance of the service that owns
|
1104
1160
|
# the custom model.
|
@@ -1137,8 +1193,8 @@ module IBMWatson
|
|
1137
1193
|
# resumes the status that it had prior to upgrade. The service cannot accept
|
1138
1194
|
# subsequent requests for the model until the upgrade completes.
|
1139
1195
|
#
|
1140
|
-
#
|
1141
|
-
#
|
1196
|
+
# **See also:** [Upgrading a custom language
|
1197
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/custom-upgrade.html#upgradeLanguage).
|
1142
1198
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1143
1199
|
# request with service credentials created for the instance of the service that owns
|
1144
1200
|
# the custom model.
|
@@ -1168,6 +1224,9 @@ module IBMWatson
|
|
1168
1224
|
# includes the total number of words and out-of-vocabulary (OOV) words, name, and
|
1169
1225
|
# status of each corpus. You must use credentials for the instance of the service
|
1170
1226
|
# that owns a model to list its corpora.
|
1227
|
+
#
|
1228
|
+
# **See also:** [Listing corpora for a custom language
|
1229
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-corpora.html#listCorpora).
|
1171
1230
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1172
1231
|
# request with service credentials created for the instance of the service that owns
|
1173
1232
|
# the custom model.
|
@@ -1199,11 +1258,7 @@ module IBMWatson
|
|
1199
1258
|
# Submit a plain text file that contains sample sentences from the domain of
|
1200
1259
|
# interest to enable the service to extract words in context. The more sentences you
|
1201
1260
|
# add that represent the context in which speakers use words from the domain, the
|
1202
|
-
# better the service's recognition accuracy.
|
1203
|
-
# text file and for information about how the service parses a corpus file, see
|
1204
|
-
# [Preparing a corpus text
|
1205
|
-
# file](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#prepareCorpus).
|
1206
|
-
#
|
1261
|
+
# better the service's recognition accuracy.
|
1207
1262
|
#
|
1208
1263
|
# The call returns an HTTP 201 response code if the corpus is valid. The service
|
1209
1264
|
# then asynchronously processes the contents of the corpus and automatically
|
@@ -1232,6 +1287,12 @@ module IBMWatson
|
|
1232
1287
|
# to a maximum of 10 million total words from all corpora combined. Also, you can
|
1233
1288
|
# add no more than 30 thousand custom (OOV) words to a model; this includes words
|
1234
1289
|
# that the service extracts from corpora and words that you add directly.
|
1290
|
+
#
|
1291
|
+
# **See also:**
|
1292
|
+
# * [Working with
|
1293
|
+
# corpora](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#workingCorpora)
|
1294
|
+
# * [Add corpora to the custom language
|
1295
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html#addCorpora).
|
1235
1296
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1236
1297
|
# request with service credentials created for the instance of the service that owns
|
1237
1298
|
# the custom model.
|
@@ -1295,6 +1356,9 @@ module IBMWatson
|
|
1295
1356
|
# includes the total number of words and out-of-vocabulary (OOV) words, name, and
|
1296
1357
|
# status of the corpus. You must use credentials for the instance of the service
|
1297
1358
|
# that owns a model to list its corpora.
|
1359
|
+
#
|
1360
|
+
# **See also:** [Listing corpora for a custom language
|
1361
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-corpora.html#listCorpora).
|
1298
1362
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1299
1363
|
# request with service credentials created for the instance of the service that owns
|
1300
1364
|
# the custom model.
|
@@ -1327,6 +1391,9 @@ module IBMWatson
|
|
1327
1391
|
# method. Removing a corpus does not affect the custom model until you train the
|
1328
1392
|
# model with the **Train a custom language model** method. You must use credentials
|
1329
1393
|
# for the instance of the service that owns a model to delete its corpora.
|
1394
|
+
#
|
1395
|
+
# **See also:** [Deleting a corpus from a custom language
|
1396
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-corpora.html#deleteCorpus).
|
1330
1397
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1331
1398
|
# request with service credentials created for the instance of the service that owns
|
1332
1399
|
# the custom model.
|
@@ -1362,6 +1429,9 @@ module IBMWatson
|
|
1362
1429
|
# return words; by default, words are listed in ascending alphabetical order. You
|
1363
1430
|
# must use credentials for the instance of the service that owns a model to query
|
1364
1431
|
# information about its words.
|
1432
|
+
#
|
1433
|
+
# **See also:** [Listing words from a custom language
|
1434
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-words.html#listWords).
|
1365
1435
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1366
1436
|
# request with service credentials created for the instance of the service that owns
|
1367
1437
|
# the custom model.
|
@@ -1421,14 +1491,12 @@ module IBMWatson
|
|
1421
1491
|
# the parameter for words that are difficult to pronounce, foreign words, acronyms,
|
1422
1492
|
# and so on. For example, you might specify that the word `IEEE` can sound like `i
|
1423
1493
|
# triple e`. You can specify a maximum of five sounds-like pronunciations for a
|
1424
|
-
# word.
|
1425
|
-
# field](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#soundsLike).
|
1494
|
+
# word.
|
1426
1495
|
# * The `display_as` field provides a different way of spelling the word in a
|
1427
1496
|
# transcript. Use the parameter when you want the word to appear different from its
|
1428
1497
|
# usual representation or from its spelling in corpora training data. For example,
|
1429
1498
|
# you might indicate that the word `IBM(trademark)` is to be displayed as
|
1430
|
-
# `IBM™`.
|
1431
|
-
# field](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#displayAs).
|
1499
|
+
# `IBM™`.
|
1432
1500
|
#
|
1433
1501
|
#
|
1434
1502
|
# If you add a custom word that already exists in the words resource for the custom
|
@@ -1452,6 +1520,13 @@ module IBMWatson
|
|
1452
1520
|
# the words that you add. Words with an invalid `sounds_like` field include an
|
1453
1521
|
# `error` field that describes the problem. You can use other words-related methods
|
1454
1522
|
# to correct errors, eliminate typos, and modify how words are pronounced as needed.
|
1523
|
+
#
|
1524
|
+
#
|
1525
|
+
# **See also:**
|
1526
|
+
# * [Working with custom
|
1527
|
+
# words](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#workingWords)
|
1528
|
+
# * [Add words to the custom language
|
1529
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html#addWords).
|
1455
1530
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1456
1531
|
# request with service credentials created for the instance of the service that owns
|
1457
1532
|
# the custom model.
|
@@ -1502,20 +1577,24 @@ module IBMWatson
|
|
1502
1577
|
# the parameter for words that are difficult to pronounce, foreign words, acronyms,
|
1503
1578
|
# and so on. For example, you might specify that the word `IEEE` can sound like `i
|
1504
1579
|
# triple e`. You can specify a maximum of five sounds-like pronunciations for a
|
1505
|
-
# word.
|
1506
|
-
# field](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#soundsLike).
|
1580
|
+
# word.
|
1507
1581
|
# * The `display_as` field provides a different way of spelling the word in a
|
1508
1582
|
# transcript. Use the parameter when you want the word to appear different from its
|
1509
1583
|
# usual representation or from its spelling in corpora training data. For example,
|
1510
1584
|
# you might indicate that the word `IBM(trademark)` is to be displayed as
|
1511
|
-
# `IBM™`.
|
1512
|
-
# field](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#displayAs).
|
1585
|
+
# `IBM™`.
|
1513
1586
|
#
|
1514
1587
|
#
|
1515
1588
|
# If you add a custom word that already exists in the words resource for the custom
|
1516
1589
|
# model, the new definition overwrites the existing data for the word. If the
|
1517
1590
|
# service encounters an error, it does not add the word to the words resource. Use
|
1518
1591
|
# the **List a custom word** method to review the word that you add.
|
1592
|
+
#
|
1593
|
+
# **See also:**
|
1594
|
+
# * [Working with custom
|
1595
|
+
# words](https://console.bluemix.net/docs/services/speech-to-text/language-resource.html#workingWords)
|
1596
|
+
# * [Add words to the custom language
|
1597
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html#addWords).
|
1519
1598
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1520
1599
|
# request with service credentials created for the instance of the service that owns
|
1521
1600
|
# the custom model.
|
@@ -1572,6 +1651,9 @@ module IBMWatson
|
|
1572
1651
|
# Gets information about a custom word from a custom language model. You must use
|
1573
1652
|
# credentials for the instance of the service that owns a model to query information
|
1574
1653
|
# about its words.
|
1654
|
+
#
|
1655
|
+
# **See also:** [Listing words from a custom language
|
1656
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-words.html#listWords).
|
1575
1657
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1576
1658
|
# request with service credentials created for the instance of the service that owns
|
1577
1659
|
# the custom model.
|
@@ -1606,6 +1688,9 @@ module IBMWatson
|
|
1606
1688
|
# custom word does not affect the custom model until you train the model with the
|
1607
1689
|
# **Train a custom language model** method. You must use credentials for the
|
1608
1690
|
# instance of the service that owns a model to delete its words.
|
1691
|
+
#
|
1692
|
+
# **See also:** [Deleting a word from a custom language
|
1693
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/language-words.html#deleteWord).
|
1609
1694
|
# @param customization_id [String] The customization ID (GUID) of the custom language model. You must make the
|
1610
1695
|
# request with service credentials created for the instance of the service that owns
|
1611
1696
|
# the custom model.
|
@@ -1640,6 +1725,9 @@ module IBMWatson
|
|
1640
1725
|
# acoustic model can be used only with the base model for which it is created. The
|
1641
1726
|
# model is owned by the instance of the service whose credentials are used to create
|
1642
1727
|
# it.
|
1728
|
+
#
|
1729
|
+
# **See also:** [Create a custom acoustic
|
1730
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-create.html#createModel).
|
1643
1731
|
# @param name [String] A user-defined name for the new custom acoustic model. Use a name that is unique
|
1644
1732
|
# among all custom acoustic models that you own. Use a localized name that matches
|
1645
1733
|
# the language of the custom model. Use a name that describes the acoustic
|
@@ -1684,6 +1772,9 @@ module IBMWatson
|
|
1684
1772
|
# the specified language. Omit the parameter to see all custom acoustic models for
|
1685
1773
|
# all languages. You must use credentials for the instance of the service that owns
|
1686
1774
|
# a model to list information about it.
|
1775
|
+
#
|
1776
|
+
# **See also:** [Listing custom acoustic
|
1777
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/acoustic-models.html#listModels).
|
1687
1778
|
# @param language [String] The identifier of the language for which custom language or custom acoustic models
|
1688
1779
|
# are to be returned (for example, `en-US`). Omit the parameter to see all custom
|
1689
1780
|
# language or custom acoustic models owned by the requesting service credentials.
|
@@ -1710,6 +1801,9 @@ module IBMWatson
|
|
1710
1801
|
# Get a custom acoustic model.
|
1711
1802
|
# Gets information about a specified custom acoustic model. You must use credentials
|
1712
1803
|
# for the instance of the service that owns a model to list information about it.
|
1804
|
+
#
|
1805
|
+
# **See also:** [Listing custom acoustic
|
1806
|
+
# models](https://console.bluemix.net/docs/services/speech-to-text/acoustic-models.html#listModels).
|
1713
1807
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1714
1808
|
# request with service credentials created for the instance of the service that owns
|
1715
1809
|
# the custom model.
|
@@ -1736,6 +1830,9 @@ module IBMWatson
|
|
1736
1830
|
# another request, such as adding an audio resource to the model, is currently being
|
1737
1831
|
# processed. You must use credentials for the instance of the service that owns a
|
1738
1832
|
# model to delete it.
|
1833
|
+
#
|
1834
|
+
# **See also:** [Deleting a custom acoustic
|
1835
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-models.html#deleteModel).
|
1739
1836
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1740
1837
|
# request with service credentials created for the instance of the service that owns
|
1741
1838
|
# the custom model.
|
@@ -1786,10 +1883,7 @@ module IBMWatson
|
|
1786
1883
|
# Specify a custom language model if you have verbatim transcriptions of the audio
|
1787
1884
|
# files that you have added to the custom model or you have either corpora (text
|
1788
1885
|
# files) or a list of words that are relevant to the contents of the audio files.
|
1789
|
-
# For information
|
1790
|
-
# custom language
|
1791
|
-
# model](https://console.bluemix.net/docs/services/speech-to-text/language-create.html).
|
1792
|
-
#
|
1886
|
+
# For more information, see the **Create a custom language model** method.
|
1793
1887
|
#
|
1794
1888
|
# Training can fail to start for the following reasons:
|
1795
1889
|
# * The service is currently handling another request for the custom model, such as
|
@@ -1797,6 +1891,9 @@ module IBMWatson
|
|
1797
1891
|
# * The custom model contains less than 10 minutes or more than 50 hours of audio
|
1798
1892
|
# data.
|
1799
1893
|
# * One or more of the custom model's audio resources is invalid.
|
1894
|
+
#
|
1895
|
+
# **See also:** [Train the custom acoustic
|
1896
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-create.html#trainModel).
|
1800
1897
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1801
1898
|
# request with service credentials created for the instance of the service that owns
|
1802
1899
|
# the custom model.
|
@@ -1832,6 +1929,9 @@ module IBMWatson
|
|
1832
1929
|
# first created. Metadata such as the name and language of the model are preserved,
|
1833
1930
|
# but the model's audio resources are removed and must be re-created. You must use
|
1834
1931
|
# credentials for the instance of the service that owns a model to reset it.
|
1932
|
+
#
|
1933
|
+
# **See also:** [Resetting a custom acoustic
|
1934
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-models.html#resetModel).
|
1835
1935
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1836
1936
|
# request with service credentials created for the instance of the service that owns
|
1837
1937
|
# the custom model.
|
@@ -1877,8 +1977,8 @@ module IBMWatson
|
|
1877
1977
|
# the custom acoustic model can be upgraded. Omit the parameter if the custom
|
1878
1978
|
# acoustic model was not trained with a custom language model.
|
1879
1979
|
#
|
1880
|
-
#
|
1881
|
-
#
|
1980
|
+
# **See also:** [Upgrading a custom acoustic
|
1981
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/custom-upgrade.html#upgradeAcoustic).
|
1882
1982
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1883
1983
|
# request with service credentials created for the instance of the service that owns
|
1884
1984
|
# the custom model.
|
@@ -1917,6 +2017,9 @@ module IBMWatson
|
|
1917
2017
|
# which is important for checking the service's analysis of the resource in response
|
1918
2018
|
# to a request to add it to the custom acoustic model. You must use credentials for
|
1919
2019
|
# the instance of the service that owns a model to list its audio resources.
|
2020
|
+
#
|
2021
|
+
# **See also:** [Listing audio resources for a custom acoustic
|
2022
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-audio.html#listAudio).
|
1920
2023
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
1921
2024
|
# request with service credentials created for the instance of the service that owns
|
1922
2025
|
# the custom model.
|
@@ -1975,11 +2078,16 @@ module IBMWatson
|
|
1975
2078
|
# returns the status of the resource. Use a loop to check the status of the audio
|
1976
2079
|
# every few seconds until it becomes `ok`.
|
1977
2080
|
#
|
2081
|
+
# **See also:** [Add audio to the custom acoustic
|
2082
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-create.html#addAudio).
|
2083
|
+
#
|
2084
|
+
#
|
1978
2085
|
# ### Content types for audio-type resources
|
1979
2086
|
#
|
1980
2087
|
# You can add an individual audio file in any format that the service supports for
|
1981
2088
|
# speech recognition. For an audio-type resource, use the `Content-Type` parameter
|
1982
|
-
# to specify the audio format (MIME type) of the audio file
|
2089
|
+
# to specify the audio format (MIME type) of the audio file, including specifying
|
2090
|
+
# the sampling rate, channels, and endianness where indicated.
|
1983
2091
|
# * `audio/basic` (Use only with narrowband models.)
|
1984
2092
|
# * `audio/flac`
|
1985
2093
|
# * `audio/l16` (Specify the sampling rate (`rate`) and optionally the number of
|
@@ -1995,8 +2103,7 @@ module IBMWatson
|
|
1995
2103
|
# * `audio/webm;codecs=opus`
|
1996
2104
|
# * `audio/webm;codecs=vorbis`
|
1997
2105
|
#
|
1998
|
-
#
|
1999
|
-
# sampling rate, channels, and endianness for the indicated formats, see [Audio
|
2106
|
+
# **See also:** [Audio
|
2000
2107
|
# formats](https://console.bluemix.net/docs/services/speech-to-text/audio-formats.html).
|
2001
2108
|
#
|
2002
2109
|
#
|
@@ -2107,6 +2214,9 @@ module IBMWatson
|
|
2107
2214
|
#
|
2108
2215
|
# You must use credentials for the instance of the service that owns a model to list
|
2109
2216
|
# its audio resources.
|
2217
|
+
#
|
2218
|
+
# **See also:** [Listing audio resources for a custom acoustic
|
2219
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-audio.html#listAudio).
|
2110
2220
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
2111
2221
|
# request with service credentials created for the instance of the service that owns
|
2112
2222
|
# the custom model.
|
@@ -2139,6 +2249,9 @@ module IBMWatson
|
|
2139
2249
|
# model on its updated data by using the **Train a custom acoustic model** method.
|
2140
2250
|
# You must use credentials for the instance of the service that owns a model to
|
2141
2251
|
# delete its audio resources.
|
2252
|
+
#
|
2253
|
+
# **See also:** [Deleting an audio resource from a custom acoustic
|
2254
|
+
# model](https://console.bluemix.net/docs/services/speech-to-text/acoustic-audio.html#deleteAudio).
|
2142
2255
|
# @param customization_id [String] The customization ID (GUID) of the custom acoustic model. You must make the
|
2143
2256
|
# request with service credentials created for the instance of the service that owns
|
2144
2257
|
# the custom model.
|
@@ -2174,8 +2287,9 @@ module IBMWatson
|
|
2174
2287
|
# the service that was used to associate the customer ID with the data.
|
2175
2288
|
#
|
2176
2289
|
# You associate a customer ID with data by passing the `X-Watson-Metadata` header
|
2177
|
-
# with a request that passes the data.
|
2178
|
-
#
|
2290
|
+
# with a request that passes the data.
|
2291
|
+
#
|
2292
|
+
# **See also:** [Information
|
2179
2293
|
# security](https://console.bluemix.net/docs/services/speech-to-text/information-security.html).
|
2180
2294
|
# @param customer_id [String] The customer ID for which all data is to be deleted.
|
2181
2295
|
# @return [nil]
|