ibm_watson 1.3.1 → 2.0.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -5
  3. data/lib/ibm_watson/assistant_v1.rb +225 -199
  4. data/lib/ibm_watson/assistant_v2.rb +228 -21
  5. data/lib/ibm_watson/compare_comply_v1.rb +43 -24
  6. data/lib/ibm_watson/discovery_v1.rb +144 -19
  7. data/lib/ibm_watson/discovery_v2.rb +742 -23
  8. data/lib/ibm_watson/language_translator_v3.rb +216 -64
  9. data/lib/ibm_watson/natural_language_classifier_v1.rb +11 -3
  10. data/lib/ibm_watson/natural_language_understanding_v1.rb +32 -26
  11. data/lib/ibm_watson/personality_insights_v3.rb +34 -19
  12. data/lib/ibm_watson/speech_to_text_v1.rb +239 -106
  13. data/lib/ibm_watson/text_to_speech_v1.rb +139 -146
  14. data/lib/ibm_watson/tone_analyzer_v3.rb +19 -14
  15. data/lib/ibm_watson/version.rb +1 -1
  16. data/lib/ibm_watson/visual_recognition_v3.rb +40 -17
  17. data/lib/ibm_watson/visual_recognition_v4.rb +110 -18
  18. data/test/integration/test_assistant_v1.rb +9 -0
  19. data/test/integration/test_assistant_v2.rb +34 -0
  20. data/test/integration/test_compare_comply_v1.rb +1 -12
  21. data/test/integration/test_discovery_v2.rb +132 -6
  22. data/test/integration/test_language_translator_v3.rb +5 -0
  23. data/test/integration/test_text_to_speech_v1.rb +3 -3
  24. data/test/integration/test_visual_recognition_v4.rb +9 -0
  25. data/test/unit/test_assistant_v1.rb +149 -98
  26. data/test/unit/test_assistant_v2.rb +153 -8
  27. data/test/unit/test_compare_comply_v1.rb +20 -20
  28. data/test/unit/test_discovery_v1.rb +125 -125
  29. data/test/unit/test_discovery_v2.rb +262 -29
  30. data/test/unit/test_language_translator_v3.rb +85 -24
  31. data/test/unit/test_natural_language_classifier_v1.rb +17 -17
  32. data/test/unit/test_natural_language_understanding_v1.rb +10 -10
  33. data/test/unit/test_personality_insights_v3.rb +14 -14
  34. data/test/unit/test_speech_to_text_v1.rb +97 -97
  35. data/test/unit/test_text_to_speech_v1.rb +48 -48
  36. data/test/unit/test_tone_analyzer_v3.rb +12 -12
  37. data/test/unit/test_visual_recognition_v3.rb +16 -16
  38. data/test/unit/test_visual_recognition_v4.rb +56 -38
  39. metadata +3 -3
@@ -13,24 +13,28 @@
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
-
17
- # The IBM® Text to Speech service provides APIs that use IBM's speech-synthesis
18
- # capabilities to synthesize text into natural-sounding speech in a variety of languages,
19
- # dialects, and voices. The service supports at least one male or female voice, sometimes
20
- # both, for each language. The audio is streamed back to the client with minimal delay.
16
+ #
17
+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18
+ #
19
+ # The IBM Watson™ Text to Speech service provides APIs that use IBM's
20
+ # speech-synthesis capabilities to synthesize text into natural-sounding speech in a
21
+ # variety of languages, dialects, and voices. The service supports at least one male or
22
+ # female voice, sometimes both, for each language. The audio is streamed back to the
23
+ # client with minimal delay.
21
24
  #
22
25
  # For speech synthesis, the service supports a synchronous HTTP Representational State
23
- # Transfer (REST) interface. It also supports a WebSocket interface that provides both
24
- # plain text and SSML input, including the SSML <mark> element and word timings.
25
- # SSML is an XML-based markup language that provides text annotation for speech-synthesis
26
- # applications.
26
+ # Transfer (REST) interface and a WebSocket interface. Both interfaces support plain text
27
+ # and SSML input. SSML is an XML-based markup language that provides text annotation for
28
+ # speech-synthesis applications. The WebSocket interface also supports the SSML
29
+ # <code>&lt;mark&gt;</code> element and word timings.
27
30
  #
28
- # The service also offers a customization interface. You can use the interface to define
29
- # sounds-like or phonetic translations for words. A sounds-like translation consists of
30
- # one or more words that, when combined, sound like the word. A phonetic translation is
31
- # based on the SSML phoneme format for representing a word. You can specify a phonetic
32
- # translation in standard International Phonetic Alphabet (IPA) representation or in the
33
- # proprietary IBM Symbolic Phonetic Representation (SPR).
31
+ # The service offers a customization interface that you can use to define sounds-like or
32
+ # phonetic translations for words. A sounds-like translation consists of one or more words
33
+ # that, when combined, sound like the word. A phonetic translation is based on the SSML
34
+ # phoneme format for representing a word. You can specify a phonetic translation in
35
+ # standard International Phonetic Alphabet (IPA) representation or in the proprietary IBM
36
+ # Symbolic Phonetic Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages
37
+ # support only IPA.
34
38
 
35
39
  require "concurrent"
36
40
  require "erb"
@@ -44,6 +48,8 @@ module IBMWatson
44
48
  # The Text to Speech V1 service.
45
49
  class TextToSpeechV1 < IBMCloudSdkCore::BaseService
46
50
  include Concurrent::Async
51
+ DEFAULT_SERVICE_NAME = "text_to_speech"
52
+ DEFAULT_SERVICE_URL = "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
47
53
  ##
48
54
  # @!method initialize(args)
49
55
  # Construct a new client for the Text to Speech service.
@@ -52,15 +58,19 @@ module IBMWatson
52
58
  # @option args service_url [String] The base service URL to use when contacting the service.
53
59
  # The base service_url may differ between IBM Cloud regions.
54
60
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
61
+ # @option args service_name [String] The name of the service to configure. Will be used as the key to load
62
+ # any external configuration, if applicable.
55
63
  def initialize(args = {})
56
64
  @__async_initialized__ = false
57
65
  defaults = {}
58
- defaults[:service_url] = "https://stream.watsonplatform.net/text-to-speech/api"
66
+ defaults[:service_url] = DEFAULT_SERVICE_URL
67
+ defaults[:service_name] = DEFAULT_SERVICE_NAME
59
68
  defaults[:authenticator] = nil
69
+ user_service_url = args[:service_url] unless args[:service_url].nil?
60
70
  args = defaults.merge(args)
61
- args[:service_name] = "text_to_speech"
62
71
  args[:authenticator] = IBMCloudSdkCore::ConfigBasedAuthenticatorFactory.new.get_authenticator(service_name: args[:service_name]) if args[:authenticator].nil?
63
72
  super
73
+ @service_url = user_service_url unless user_service_url.nil?
64
74
  end
65
75
 
66
76
  #########################
@@ -71,8 +81,10 @@ module IBMWatson
71
81
  # @!method list_voices
72
82
  # List voices.
73
83
  # Lists all voices available for use with the service. The information includes the
74
- # name, language, gender, and other details about the voice. To see information
75
- # about a specific voice, use the **Get a voice** method.
84
+ # name, language, gender, and other details about the voice. The ordering of the
85
+ # list of voices can change from call to call; do not rely on an alphabetized or
86
+ # static list of voices. To see information about a specific voice, use the **Get a
87
+ # voice** method.
76
88
  #
77
89
  # **See also:** [Listing all available
78
90
  # voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoices).
@@ -99,14 +111,14 @@ module IBMWatson
99
111
  # Get a voice.
100
112
  # Gets information about the specified voice. The information includes the name,
101
113
  # language, gender, and other details about the voice. Specify a customization ID to
102
- # obtain information for a custom voice model that is defined for the language of
103
- # the specified voice. To list information about all available voices, use the
104
- # **List voices** method.
114
+ # obtain information for a custom model that is defined for the language of the
115
+ # specified voice. To list information about all available voices, use the **List
116
+ # voices** method.
105
117
  #
106
118
  # **See also:** [Listing a specific
107
119
  # voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoice).
108
120
  # @param voice [String] The voice for which information is to be returned.
109
- # @param customization_id [String] The customization ID (GUID) of a custom voice model for which information is to be
121
+ # @param customization_id [String] The customization ID (GUID) of a custom model for which information is to be
110
122
  # returned. You must make the request with credentials for the instance of the
111
123
  # service that owns the custom model. Omit the parameter to see information about
112
124
  # the specified voice with no customization.
@@ -215,11 +227,11 @@ module IBMWatson
215
227
  # specifying an audio format, see **Audio formats (accept types)** in the method
216
228
  # description.
217
229
  # @param voice [String] The voice to use for synthesis.
218
- # @param customization_id [String] The customization ID (GUID) of a custom voice model to use for the synthesis. If a
219
- # custom voice model is specified, it is guaranteed to work only if it matches the
220
- # language of the indicated voice. You must make the request with credentials for
221
- # the instance of the service that owns the custom model. Omit the parameter to use
222
- # the specified voice with no customization.
230
+ # @param customization_id [String] The customization ID (GUID) of a custom model to use for the synthesis. If a
231
+ # custom model is specified, it works only if it matches the language of the
232
+ # indicated voice. You must make the request with credentials for the instance of
233
+ # the service that owns the custom model. Omit the parameter to use the specified
234
+ # voice with no customization.
223
235
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
224
236
  def synthesize(text:, accept: nil, voice: nil, customization_id: nil)
225
237
  raise ArgumentError.new("text must be provided") if text.nil?
@@ -261,10 +273,7 @@ module IBMWatson
261
273
  # Gets the phonetic pronunciation for the specified word. You can request the
262
274
  # pronunciation for a specific format. You can also request the pronunciation for a
263
275
  # specific voice to see the default translation for the language of that voice or
264
- # for a specific custom voice model to see the translation for that voice model.
265
- #
266
- # **Note:** This method is currently a beta release. The method does not support the
267
- # Arabic, Chinese, and Dutch languages.
276
+ # for a specific custom model to see the translation for that model.
268
277
  #
269
278
  # **See also:** [Querying a word from a
270
279
  # language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
@@ -272,15 +281,16 @@ module IBMWatson
272
281
  # @param voice [String] A voice that specifies the language in which the pronunciation is to be returned.
273
282
  # All voices for the same language (for example, `en-US`) return the same
274
283
  # translation.
275
- # @param format [String] The phoneme format in which to return the pronunciation. Omit the parameter to
276
- # obtain the pronunciation in the default format.
277
- # @param customization_id [String] The customization ID (GUID) of a custom voice model for which the pronunciation is
278
- # to be returned. The language of a specified custom model must match the language
279
- # of the specified voice. If the word is not defined in the specified custom model,
280
- # the service returns the default translation for the custom model's language. You
281
- # must make the request with credentials for the instance of the service that owns
282
- # the custom model. Omit the parameter to see the translation for the specified
283
- # voice with no customization.
284
+ # @param format [String] The phoneme format in which to return the pronunciation. The Arabic, Chinese,
285
+ # Dutch, and Korean languages support only IPA. Omit the parameter to obtain the
286
+ # pronunciation in the default format.
287
+ # @param customization_id [String] The customization ID (GUID) of a custom model for which the pronunciation is to be
288
+ # returned. The language of a specified custom model must match the language of the
289
+ # specified voice. If the word is not defined in the specified custom model, the
290
+ # service returns the default translation for the custom model's language. You must
291
+ # make the request with credentials for the instance of the service that owns the
292
+ # custom model. Omit the parameter to see the translation for the specified voice
293
+ # with no customization.
284
294
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
285
295
  def get_pronunciation(text:, voice: nil, format: nil, customization_id: nil)
286
296
  raise ArgumentError.new("text must be provided") if text.nil?
@@ -313,30 +323,28 @@ module IBMWatson
313
323
  #########################
314
324
 
315
325
  ##
316
- # @!method create_voice_model(name:, language: nil, description: nil)
326
+ # @!method create_custom_model(name:, language: nil, description: nil)
317
327
  # Create a custom model.
318
- # Creates a new empty custom voice model. You must specify a name for the new custom
328
+ # Creates a new empty custom model. You must specify a name for the new custom
319
329
  # model. You can optionally specify the language and a description for the new
320
330
  # model. The model is owned by the instance of the service whose credentials are
321
331
  # used to create it.
322
332
  #
323
- # **Note:** This method is currently a beta release. The service does not support
324
- # voice model customization for the Arabic, Chinese, and Dutch languages.
325
- #
326
333
  # **See also:** [Creating a custom
327
334
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
328
- # @param name [String] The name of the new custom voice model.
329
- # @param language [String] The language of the new custom voice model. Omit the parameter to use the the
335
+ # @param name [String] The name of the new custom model.
336
+ # @param language [String] The language of the new custom model. You create a custom model for a specific
337
+ # language, not for a specific voice. A custom model can be used with any voice,
338
+ # standard or neural, for its specified language. Omit the parameter to use the the
330
339
  # default language, `en-US`.
331
- # @param description [String] A description of the new custom voice model. Specifying a description is
332
- # recommended.
340
+ # @param description [String] A description of the new custom model. Specifying a description is recommended.
333
341
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
334
- def create_voice_model(name:, language: nil, description: nil)
342
+ def create_custom_model(name:, language: nil, description: nil)
335
343
  raise ArgumentError.new("name must be provided") if name.nil?
336
344
 
337
345
  headers = {
338
346
  }
339
- sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "create_voice_model")
347
+ sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "create_custom_model")
340
348
  headers.merge!(sdk_headers)
341
349
 
342
350
  data = {
@@ -358,27 +366,25 @@ module IBMWatson
358
366
  end
359
367
 
360
368
  ##
361
- # @!method list_voice_models(language: nil)
369
+ # @!method list_custom_models(language: nil)
362
370
  # List custom models.
363
- # Lists metadata such as the name and description for all custom voice models that
364
- # are owned by an instance of the service. Specify a language to list the voice
365
- # models for that language only. To see the words in addition to the metadata for a
366
- # specific voice model, use the **List a custom model** method. You must use
371
+ # Lists metadata such as the name and description for all custom models that are
372
+ # owned by an instance of the service. Specify a language to list the custom models
373
+ # for that language only. To see the words in addition to the metadata for a
374
+ # specific custom model, use the **List a custom model** method. You must use
367
375
  # credentials for the instance of the service that owns a model to list information
368
376
  # about it.
369
377
  #
370
- # **Note:** This method is currently a beta release.
371
- #
372
378
  # **See also:** [Querying all custom
373
379
  # models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQueryAll).
374
- # @param language [String] The language for which custom voice models that are owned by the requesting
375
- # credentials are to be returned. Omit the parameter to see all custom voice models
376
- # that are owned by the requester.
380
+ # @param language [String] The language for which custom models that are owned by the requesting credentials
381
+ # are to be returned. Omit the parameter to see all custom models that are owned by
382
+ # the requester.
377
383
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
378
- def list_voice_models(language: nil)
384
+ def list_custom_models(language: nil)
379
385
  headers = {
380
386
  }
381
- sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "list_voice_models")
387
+ sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "list_custom_models")
382
388
  headers.merge!(sdk_headers)
383
389
 
384
390
  params = {
@@ -398,14 +404,14 @@ module IBMWatson
398
404
  end
399
405
 
400
406
  ##
401
- # @!method update_voice_model(customization_id:, name: nil, description: nil, words: nil)
407
+ # @!method update_custom_model(customization_id:, name: nil, description: nil, words: nil)
402
408
  # Update a custom model.
403
- # Updates information for the specified custom voice model. You can update metadata
404
- # such as the name and description of the voice model. You can also update the words
405
- # in the model and their translations. Adding a new translation for a word that
406
- # already exists in a custom model overwrites the word's existing translation. A
407
- # custom model can contain no more than 20,000 entries. You must use credentials for
408
- # the instance of the service that owns a model to update it.
409
+ # Updates information for the specified custom model. You can update metadata such
410
+ # as the name and description of the model. You can also update the words in the
411
+ # model and their translations. Adding a new translation for a word that already
412
+ # exists in a custom model overwrites the word's existing translation. A custom
413
+ # model can contain no more than 20,000 entries. You must use credentials for the
414
+ # instance of the service that owns a model to update it.
409
415
  #
410
416
  # You can define sounds-like or phonetic translations for words. A sounds-like
411
417
  # translation consists of one or more words that, when combined, sound like the
@@ -421,8 +427,6 @@ module IBMWatson
421
427
  # <code>&lt;phoneme alphabet="ibm"
422
428
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
423
429
  #
424
- # **Note:** This method is currently a beta release.
425
- #
426
430
  # **See also:**
427
431
  # * [Updating a custom
428
432
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsUpdate)
@@ -430,20 +434,20 @@ module IBMWatson
430
434
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
431
435
  # * [Understanding
432
436
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
433
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
434
- # with credentials for the instance of the service that owns the custom model.
435
- # @param name [String] A new name for the custom voice model.
436
- # @param description [String] A new description for the custom voice model.
437
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
438
+ # credentials for the instance of the service that owns the custom model.
439
+ # @param name [String] A new name for the custom model.
440
+ # @param description [String] A new description for the custom model.
437
441
  # @param words [Array[Word]] An array of `Word` objects that provides the words and their translations that are
438
- # to be added or updated for the custom voice model. Pass an empty array to make no
442
+ # to be added or updated for the custom model. Pass an empty array to make no
439
443
  # additions or updates.
440
444
  # @return [nil]
441
- def update_voice_model(customization_id:, name: nil, description: nil, words: nil)
445
+ def update_custom_model(customization_id:, name: nil, description: nil, words: nil)
442
446
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
443
447
 
444
448
  headers = {
445
449
  }
446
- sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "update_voice_model")
450
+ sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "update_custom_model")
447
451
  headers.merge!(sdk_headers)
448
452
 
449
453
  data = {
@@ -465,26 +469,24 @@ module IBMWatson
465
469
  end
466
470
 
467
471
  ##
468
- # @!method get_voice_model(customization_id:)
472
+ # @!method get_custom_model(customization_id:)
469
473
  # Get a custom model.
470
- # Gets all information about a specified custom voice model. In addition to metadata
471
- # such as the name and description of the voice model, the output includes the words
472
- # and their translations as defined in the model. To see just the metadata for a
473
- # voice model, use the **List custom models** method.
474
- #
475
- # **Note:** This method is currently a beta release.
474
+ # Gets all information about a specified custom model. In addition to metadata such
475
+ # as the name and description of the custom model, the output includes the words and
476
+ # their translations as defined in the model. To see just the metadata for a model,
477
+ # use the **List custom models** method.
476
478
  #
477
479
  # **See also:** [Querying a custom
478
480
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQuery).
479
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
480
- # with credentials for the instance of the service that owns the custom model.
481
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
482
+ # credentials for the instance of the service that owns the custom model.
481
483
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
482
- def get_voice_model(customization_id:)
484
+ def get_custom_model(customization_id:)
483
485
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
484
486
 
485
487
  headers = {
486
488
  }
487
- sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "get_voice_model")
489
+ sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "get_custom_model")
488
490
  headers.merge!(sdk_headers)
489
491
 
490
492
  method_url = "/v1/customizations/%s" % [ERB::Util.url_encode(customization_id)]
@@ -499,24 +501,22 @@ module IBMWatson
499
501
  end
500
502
 
501
503
  ##
502
- # @!method delete_voice_model(customization_id:)
504
+ # @!method delete_custom_model(customization_id:)
503
505
  # Delete a custom model.
504
- # Deletes the specified custom voice model. You must use credentials for the
505
- # instance of the service that owns a model to delete it.
506
- #
507
- # **Note:** This method is currently a beta release.
506
+ # Deletes the specified custom model. You must use credentials for the instance of
507
+ # the service that owns a model to delete it.
508
508
  #
509
509
  # **See also:** [Deleting a custom
510
510
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsDelete).
511
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
512
- # with credentials for the instance of the service that owns the custom model.
511
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
512
+ # credentials for the instance of the service that owns the custom model.
513
513
  # @return [nil]
514
- def delete_voice_model(customization_id:)
514
+ def delete_custom_model(customization_id:)
515
515
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
516
516
 
517
517
  headers = {
518
518
  }
519
- sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "delete_voice_model")
519
+ sdk_headers = Common.new.get_sdk_headers("text_to_speech", "V1", "delete_custom_model")
520
520
  headers.merge!(sdk_headers)
521
521
 
522
522
  method_url = "/v1/customizations/%s" % [ERB::Util.url_encode(customization_id)]
@@ -536,7 +536,7 @@ module IBMWatson
536
536
  ##
537
537
  # @!method add_words(customization_id:, words:)
538
538
  # Add custom words.
539
- # Adds one or more words and their translations to the specified custom voice model.
539
+ # Adds one or more words and their translations to the specified custom model.
540
540
  # Adding a new translation for a word that already exists in a custom model
541
541
  # overwrites the word's existing translation. A custom model can contain no more
542
542
  # than 20,000 entries. You must use credentials for the instance of the service that
@@ -556,8 +556,6 @@ module IBMWatson
556
556
  # <code>&lt;phoneme alphabet="ibm"
557
557
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
558
558
  #
559
- # **Note:** This method is currently a beta release.
560
- #
561
559
  # **See also:**
562
560
  # * [Adding multiple words to a custom
563
561
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsAdd)
@@ -565,15 +563,15 @@ module IBMWatson
565
563
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
566
564
  # * [Understanding
567
565
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
568
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
569
- # with credentials for the instance of the service that owns the custom model.
566
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
567
+ # credentials for the instance of the service that owns the custom model.
570
568
  # @param words [Array[Word]] The **Add custom words** method accepts an array of `Word` objects. Each object
571
- # provides a word that is to be added or updated for the custom voice model and the
572
- # word's translation.
569
+ # provides a word that is to be added or updated for the custom model and the word's
570
+ # translation.
573
571
  #
574
572
  # The **List custom words** method returns an array of `Word` objects. Each object
575
- # shows a word and its translation from the custom voice model. The words are listed
576
- # in alphabetical order, with uppercase letters listed before lowercase letters. The
573
+ # shows a word and its translation from the custom model. The words are listed in
574
+ # alphabetical order, with uppercase letters listed before lowercase letters. The
577
575
  # array is empty if the custom model contains no words.
578
576
  # @return [nil]
579
577
  def add_words(customization_id:, words:)
@@ -605,17 +603,14 @@ module IBMWatson
605
603
  ##
606
604
  # @!method list_words(customization_id:)
607
605
  # List custom words.
608
- # Lists all of the words and their translations for the specified custom voice
609
- # model. The output shows the translations as they are defined in the model. You
610
- # must use credentials for the instance of the service that owns a model to list its
611
- # words.
612
- #
613
- # **Note:** This method is currently a beta release.
606
+ # Lists all of the words and their translations for the specified custom model. The
607
+ # output shows the translations as they are defined in the model. You must use
608
+ # credentials for the instance of the service that owns a model to list its words.
614
609
  #
615
610
  # **See also:** [Querying all words from a custom
616
611
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryModel).
617
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
618
- # with credentials for the instance of the service that owns the custom model.
612
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
613
+ # credentials for the instance of the service that owns the custom model.
619
614
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
620
615
  def list_words(customization_id:)
621
616
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -639,11 +634,11 @@ module IBMWatson
639
634
  ##
640
635
  # @!method add_word(customization_id:, word:, translation:, part_of_speech: nil)
641
636
  # Add a custom word.
642
- # Adds a single word and its translation to the specified custom voice model. Adding
643
- # a new translation for a word that already exists in a custom model overwrites the
644
- # word's existing translation. A custom model can contain no more than 20,000
645
- # entries. You must use credentials for the instance of the service that owns a
646
- # model to add a word to it.
637
+ # Adds a single word and its translation to the specified custom model. Adding a new
638
+ # translation for a word that already exists in a custom model overwrites the word's
639
+ # existing translation. A custom model can contain no more than 20,000 entries. You
640
+ # must use credentials for the instance of the service that owns a model to add a
641
+ # word to it.
647
642
  #
648
643
  # You can define sounds-like or phonetic translations for words. A sounds-like
649
644
  # translation consists of one or more words that, when combined, sound like the
@@ -659,8 +654,6 @@ module IBMWatson
659
654
  # <code>&lt;phoneme alphabet="ibm"
660
655
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
661
656
  #
662
- # **Note:** This method is currently a beta release.
663
- #
664
657
  # **See also:**
665
658
  # * [Adding a single word to a custom
666
659
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordAdd)
@@ -668,13 +661,14 @@ module IBMWatson
668
661
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
669
662
  # * [Understanding
670
663
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
671
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
672
- # with credentials for the instance of the service that owns the custom model.
673
- # @param word [String] The word that is to be added or updated for the custom voice model.
664
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
665
+ # credentials for the instance of the service that owns the custom model.
666
+ # @param word [String] The word that is to be added or updated for the custom model.
674
667
  # @param translation [String] The phonetic or sounds-like translation for the word. A phonetic translation is
675
668
  # based on the SSML format for representing the phonetic string of a word either as
676
- # an IPA translation or as an IBM SPR translation. A sounds-like is one or more
677
- # words that, when combined, sound like the word.
669
+ # an IPA translation or as an IBM SPR translation. The Arabic, Chinese, Dutch, and
670
+ # Korean languages support only IPA. A sounds-like is one or more words that, when
671
+ # combined, sound like the word.
678
672
  # @param part_of_speech [String] **Japanese only.** The part of speech for the word. The service uses the value to
679
673
  # produce the correct intonation for the word. You can create only a single entry,
680
674
  # with or without a single part of speech, for any word; you cannot create multiple
@@ -718,13 +712,11 @@ module IBMWatson
718
712
  # shows the translation as it is defined in the model. You must use credentials for
719
713
  # the instance of the service that owns a model to list its words.
720
714
  #
721
- # **Note:** This method is currently a beta release.
722
- #
723
715
  # **See also:** [Querying a single word from a custom
724
716
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordQueryModel).
725
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
726
- # with credentials for the instance of the service that owns the custom model.
727
- # @param word [String] The word that is to be queried from the custom voice model.
717
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
718
+ # credentials for the instance of the service that owns the custom model.
719
+ # @param word [String] The word that is to be queried from the custom model.
728
720
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
729
721
  def get_word(customization_id:, word:)
730
722
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -750,17 +742,14 @@ module IBMWatson
750
742
  ##
751
743
  # @!method delete_word(customization_id:, word:)
752
744
  # Delete a custom word.
753
- # Deletes a single word from the specified custom voice model. You must use
754
- # credentials for the instance of the service that owns a model to delete its words.
755
- #
756
- #
757
- # **Note:** This method is currently a beta release.
745
+ # Deletes a single word from the specified custom model. You must use credentials
746
+ # for the instance of the service that owns a model to delete its words.
758
747
  #
759
748
  # **See also:** [Deleting a word from a custom
760
749
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordDelete).
761
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
762
- # with credentials for the instance of the service that owns the custom model.
763
- # @param word [String] The word that is to be deleted from the custom voice model.
750
+ # @param customization_id [String] The customization ID (GUID) of the custom model. You must make the request with
751
+ # credentials for the instance of the service that owns the custom model.
752
+ # @param word [String] The word that is to be deleted from the custom model.
764
753
  # @return [nil]
765
754
  def delete_word(customization_id:, word:)
766
755
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -793,10 +782,14 @@ module IBMWatson
793
782
  # deletes all data for the customer ID, regardless of the method by which the
794
783
  # information was added. The method has no effect if no data is associated with the
795
784
  # customer ID. You must issue the request with credentials for the same instance of
796
- # the service that was used to associate the customer ID with the data.
797
- #
798
- # You associate a customer ID with data by passing the `X-Watson-Metadata` header
799
- # with a request that passes the data.
785
+ # the service that was used to associate the customer ID with the data. You
786
+ # associate a customer ID with data by passing the `X-Watson-Metadata` header with a
787
+ # request that passes the data.
788
+ #
789
+ # **Note:** If you delete an instance of the service from the service console, all
790
+ # data associated with that service instance is automatically deleted. This includes
791
+ # all custom models and word/translation pairs, and all data related to speech
792
+ # synthesis requests.
800
793
  #
801
794
  # **See also:** [Information
802
795
  # security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-information-security#information-security).