ibm_watson 1.5.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -4
  3. data/lib/ibm_watson/assistant_v1.rb +213 -195
  4. data/lib/ibm_watson/assistant_v2.rb +161 -17
  5. data/lib/ibm_watson/compare_comply_v1.rb +35 -21
  6. data/lib/ibm_watson/discovery_v1.rb +132 -13
  7. data/lib/ibm_watson/discovery_v2.rb +728 -21
  8. data/lib/ibm_watson/language_translator_v3.rb +205 -67
  9. data/lib/ibm_watson/natural_language_classifier_v1.rb +4 -2
  10. data/lib/ibm_watson/natural_language_understanding_v1.rb +21 -21
  11. data/lib/ibm_watson/personality_insights_v3.rb +27 -18
  12. data/lib/ibm_watson/speech_to_text_v1.rb +58 -46
  13. data/lib/ibm_watson/text_to_speech_v1.rb +113 -129
  14. data/lib/ibm_watson/tone_analyzer_v3.rb +12 -13
  15. data/lib/ibm_watson/version.rb +1 -1
  16. data/lib/ibm_watson/visual_recognition_v3.rb +33 -16
  17. data/lib/ibm_watson/visual_recognition_v4.rb +58 -17
  18. data/test/integration/test_assistant_v1.rb +9 -0
  19. data/test/integration/test_assistant_v2.rb +27 -0
  20. data/test/integration/test_discovery_v2.rb +132 -6
  21. data/test/integration/test_language_translator_v3.rb +5 -0
  22. data/test/integration/test_text_to_speech_v1.rb +3 -3
  23. data/test/unit/test_assistant_v1.rb +150 -99
  24. data/test/unit/test_assistant_v2.rb +91 -12
  25. data/test/unit/test_compare_comply_v1.rb +20 -20
  26. data/test/unit/test_discovery_v1.rb +125 -125
  27. data/test/unit/test_discovery_v2.rb +262 -29
  28. data/test/unit/test_language_translator_v3.rb +85 -24
  29. data/test/unit/test_natural_language_classifier_v1.rb +17 -17
  30. data/test/unit/test_natural_language_understanding_v1.rb +10 -10
  31. data/test/unit/test_personality_insights_v3.rb +14 -14
  32. data/test/unit/test_speech_to_text_v1.rb +97 -97
  33. data/test/unit/test_text_to_speech_v1.rb +48 -48
  34. data/test/unit/test_tone_analyzer_v3.rb +12 -12
  35. data/test/unit/test_visual_recognition_v3.rb +16 -16
  36. data/test/unit/test_visual_recognition_v4.rb +40 -40
  37. metadata +12 -11
@@ -13,12 +13,25 @@
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 Watson™ Personality Insights service enables applications to derive
18
- # insights from social media, enterprise data, or other digital communications. The
19
- # service uses linguistic analytics to infer individuals' intrinsic personality
20
- # characteristics, including Big Five, Needs, and Values, from digital communications such
21
- # as email, text messages, tweets, and forum posts.
16
+ #
17
+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18
+ #
19
+ # IBM® will begin sunsetting IBM Watson™ Personality Insights on 1 December
20
+ # 2020. For a period of one year from this date, you will still be able to use Watson
21
+ # Personality Insights. However, as of 1 December 2021, the offering will no longer be
22
+ # available.<br/><br/>As an alternative, we encourage you to consider migrating to IBM
23
+ # Watson&trade; Natural Language Understanding, a service on IBM Cloud&reg; that uses deep
24
+ # learning to extract data and insights from text such as keywords, categories, sentiment,
25
+ # emotion, and syntax to provide insights for your business or industry. For more
26
+ # information, see [About Natural Language
27
+ # Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-about).
28
+ # {: deprecated}
29
+ #
30
+ # The IBM Watson Personality Insights service enables applications to derive insights from
31
+ # social media, enterprise data, or other digital communications. The service uses
32
+ # linguistic analytics to infer individuals' intrinsic personality characteristics,
33
+ # including Big Five, Needs, and Values, from digital communications such as email, text
34
+ # messages, tweets, and forum posts.
22
35
  #
23
36
  # The service can automatically infer, from potentially noisy social media, portraits of
24
37
  # individuals that reflect their personality characteristics. The service can infer
@@ -48,34 +61,28 @@ module IBMWatson
48
61
  class PersonalityInsightsV3 < IBMCloudSdkCore::BaseService
49
62
  include Concurrent::Async
50
63
  DEFAULT_SERVICE_NAME = "personality_insights"
51
- DEFAULT_SERVICE_URL = "https://gateway.watsonplatform.net/personality-insights/api"
64
+ DEFAULT_SERVICE_URL = "https://api.us-south.personality-insights.watson.cloud.ibm.com"
65
+ attr_accessor :version
52
66
  ##
53
67
  # @!method initialize(args)
54
68
  # Construct a new client for the Personality Insights service.
55
69
  #
56
70
  # @param args [Hash] The args to initialize with
57
- # @option args version [String] The API version date to use with the service, in
58
- # "YYYY-MM-DD" format. Whenever the API is changed in a backwards
59
- # incompatible way, a new minor version of the API is released.
60
- # The service uses the API version for the date you specify, or
61
- # the most recent version before that date. Note that you should
62
- # not programmatically specify the current date at runtime, in
63
- # case the API has been updated since your application's release.
64
- # Instead, specify a version date that is compatible with your
65
- # application, and don't change it until your application is
66
- # ready for a later version.
71
+ # @option args version [String] Release date of the version of the API you want to use. Specify dates in
72
+ # YYYY-MM-DD format. The current version is `2017-10-13`.
67
73
  # @option args service_url [String] The base service URL to use when contacting the service.
68
74
  # The base service_url may differ between IBM Cloud regions.
69
75
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
70
76
  # @option args service_name [String] The name of the service to configure. Will be used as the key to load
71
77
  # any external configuration, if applicable.
72
78
  def initialize(args = {})
79
+ warn "On 1 December 2021, Personality Insights will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk/tree/master#personality-insights-deprecation."
73
80
  @__async_initialized__ = false
74
81
  defaults = {}
75
- defaults[:version] = nil
76
82
  defaults[:service_url] = DEFAULT_SERVICE_URL
77
83
  defaults[:service_name] = DEFAULT_SERVICE_NAME
78
84
  defaults[:authenticator] = nil
85
+ defaults[:version] = nil
79
86
  user_service_url = args[:service_url] unless args[:service_url].nil?
80
87
  args = defaults.merge(args)
81
88
  @version = args[:version]
@@ -170,6 +177,8 @@ module IBMWatson
170
177
  # default, no consumption preferences are returned.
171
178
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
172
179
  def profile(content:, accept:, content_type: nil, content_language: nil, accept_language: nil, raw_scores: nil, csv_headers: nil, consumption_preferences: nil)
180
+ raise ArgumentError.new("version must be provided") if version.nil?
181
+
173
182
  raise ArgumentError.new("content must be provided") if content.nil?
174
183
 
175
184
  raise ArgumentError.new("accept must be provided") if accept.nil?
@@ -13,13 +13,15 @@
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&reg; Speech to Text service provides APIs that use IBM's speech-recognition
18
- # capabilities to produce transcripts of spoken audio. The service can transcribe speech
19
- # from various languages and audio formats. In addition to basic transcription, the
20
- # service can produce detailed information about many different aspects of the audio. For
21
- # most languages, the service supports two sampling rates, broadband and narrowband. It
22
- # returns all JSON response content in the UTF-8 character set.
16
+ #
17
+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18
+ #
19
+ # The IBM Watson&trade; Speech to Text service provides APIs that use IBM's
20
+ # speech-recognition capabilities to produce transcripts of spoken audio. The service can
21
+ # transcribe speech from various languages and audio formats. In addition to basic
22
+ # transcription, the service can produce detailed information about many different aspects
23
+ # of the audio. For most languages, the service supports two sampling rates, broadband and
24
+ # narrowband. It returns all JSON response content in the UTF-8 character set.
23
25
  #
24
26
  # For speech recognition, the service supports synchronous and asynchronous HTTP
25
27
  # Representational State Transfer (REST) interfaces. It also supports a WebSocket
@@ -51,7 +53,7 @@ module IBMWatson
51
53
  class SpeechToTextV1 < IBMCloudSdkCore::BaseService
52
54
  include Concurrent::Async
53
55
  DEFAULT_SERVICE_NAME = "speech_to_text"
54
- DEFAULT_SERVICE_URL = "https://stream.watsonplatform.net/speech-to-text/api"
56
+ DEFAULT_SERVICE_URL = "https://api.us-south.speech-to-text.watson.cloud.ibm.com"
55
57
  ##
56
58
  # @!method initialize(args)
57
59
  # Construct a new client for the Speech to Text service.
@@ -84,7 +86,8 @@ module IBMWatson
84
86
  # List models.
85
87
  # Lists all language models that are available for use with the service. The
86
88
  # information includes the name of the model and its minimum sampling rate in Hertz,
87
- # among other things.
89
+ # among other things. The ordering of the list of models can change from call to
90
+ # call; do not rely on an alphabetized or static list of models.
88
91
  #
89
92
  # **See also:** [Languages and
90
93
  # models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#models).
@@ -229,7 +232,7 @@ module IBMWatson
229
232
  #
230
233
  # **See also:** [Making a multipart HTTP
231
234
  # request](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-http#HTTP-multi).
232
- # @param audio [String] The audio to transcribe.
235
+ # @param audio [File] The audio to transcribe.
233
236
  # @param content_type [String] The format (MIME type) of the audio. For more information about specifying an
234
237
  # audio format, see **Audio formats (content types)** in the method description.
235
238
  # @param model [String] The identifier of the model that is to be used for the recognition request. See
@@ -335,11 +338,9 @@ module IBMWatson
335
338
  # parameter to be `true`, regardless of whether you specify `false` for the
336
339
  # parameter.
337
340
  #
338
- # **Note:** Applies to US English, German, Japanese, Korean, and Spanish (both
339
- # broadband and narrowband models) and UK English (narrowband model) transcription
340
- # only. To determine whether a language model supports speaker labels, you can also
341
- # use the **Get a model** method and check that the attribute `speaker_labels` is
342
- # set to `true`.
341
+ # **Note:** Applies to US English, Australian English, German, Japanese, Korean, and
342
+ # Spanish (both broadband and narrowband models) and UK English (narrowband model)
343
+ # transcription only.
343
344
  #
344
345
  # See [Speaker
345
346
  # labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#speaker_labels).
@@ -681,9 +682,9 @@ module IBMWatson
681
682
  # @!method register_callback(callback_url:, user_secret: nil)
682
683
  # Register a callback.
683
684
  # Registers a callback URL with the service for use with subsequent asynchronous
684
- # recognition requests. The service attempts to register, or white-list, the
685
- # callback URL if it is not already registered by sending a `GET` request to the
686
- # callback URL. The service passes a random alphanumeric challenge string via the
685
+ # recognition requests. The service attempts to register, or allowlist, the callback
686
+ # URL if it is not already registered by sending a `GET` request to the callback
687
+ # URL. The service passes a random alphanumeric challenge string via the
687
688
  # `challenge_string` parameter of the request. The request includes an `Accept`
688
689
  # header that specifies `text/plain` as the required response type.
689
690
  #
@@ -695,9 +696,9 @@ module IBMWatson
695
696
  #
696
697
  # The service sends only a single `GET` request to the callback URL. If the service
697
698
  # does not receive a reply with a response code of 200 and a body that echoes the
698
- # challenge string sent by the service within five seconds, it does not white-list
699
+ # challenge string sent by the service within five seconds, it does not allowlist
699
700
  # the URL; it instead sends status code 400 in response to the **Register a
700
- # callback** request. If the requested callback URL is already white-listed, the
701
+ # callback** request. If the requested callback URL is already allowlisted, the
701
702
  # service responds to the initial registration request with response code 200.
702
703
  #
703
704
  # If you specify a user secret with the request, the service uses it as a key to
@@ -715,7 +716,7 @@ module IBMWatson
715
716
  # **See also:** [Registering a callback
716
717
  # URL](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-async#register).
717
718
  # @param callback_url [String] An HTTP or HTTPS URL to which callback notifications are to be sent. To be
718
- # white-listed, the URL must successfully echo the challenge string during URL
719
+ # allowlisted, the URL must successfully echo the challenge string during URL
719
720
  # verification. During verification, the client can also check the signature that
720
721
  # the service sends in the `X-Callback-Signature` header to verify the origin of the
721
722
  # request.
@@ -753,7 +754,7 @@ module IBMWatson
753
754
  ##
754
755
  # @!method unregister_callback(callback_url:)
755
756
  # Unregister a callback.
756
- # Unregisters a callback URL that was previously white-listed with a **Register a
757
+ # Unregisters a callback URL that was previously allowlisted with a **Register a
757
758
  # callback** request for use with the asynchronous interface. Once unregistered, the
758
759
  # URL can no longer be used with asynchronous recognition requests.
759
760
  #
@@ -884,14 +885,14 @@ module IBMWatson
884
885
  #
885
886
  # **See also:** [Audio
886
887
  # formats](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audio-formats#audio-formats).
887
- # @param audio [String] The audio to transcribe.
888
+ # @param audio [File] The audio to transcribe.
888
889
  # @param content_type [String] The format (MIME type) of the audio. For more information about specifying an
889
890
  # audio format, see **Audio formats (content types)** in the method description.
890
891
  # @param model [String] The identifier of the model that is to be used for the recognition request. See
891
892
  # [Languages and
892
893
  # models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#models).
893
894
  # @param callback_url [String] A URL to which callback notifications are to be sent. The URL must already be
894
- # successfully white-listed by using the **Register a callback** method. You can
895
+ # successfully allowlisted by using the **Register a callback** method. You can
895
896
  # include the same callback URL with any number of job creation requests. Omit the
896
897
  # parameter to poll the service for job completion and results.
897
898
  #
@@ -1024,11 +1025,9 @@ module IBMWatson
1024
1025
  # parameter to be `true`, regardless of whether you specify `false` for the
1025
1026
  # parameter.
1026
1027
  #
1027
- # **Note:** Applies to US English, German, Japanese, Korean, and Spanish (both
1028
- # broadband and narrowband models) and UK English (narrowband model) transcription
1029
- # only. To determine whether a language model supports speaker labels, you can also
1030
- # use the **Get a model** method and check that the attribute `speaker_labels` is
1031
- # set to `true`.
1028
+ # **Note:** Applies to US English, Australian English, German, Japanese, Korean, and
1029
+ # Spanish (both broadband and narrowband models) and UK English (narrowband model)
1030
+ # transcription only.
1032
1031
  #
1033
1032
  # See [Speaker
1034
1033
  # labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#speaker_labels).
@@ -1393,8 +1392,12 @@ module IBMWatson
1393
1392
  # **See also:** [Listing custom language
1394
1393
  # models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language).
1395
1394
  # @param language [String] The identifier of the language for which custom language or custom acoustic models
1396
- # are to be returned (for example, `en-US`). Omit the parameter to see all custom
1397
- # language or custom acoustic models that are owned by the requesting credentials.
1395
+ # are to be returned. Omit the parameter to see all custom language or custom
1396
+ # acoustic models that are owned by the requesting credentials.
1397
+ #
1398
+ # To determine the languages for which customization is available, see [Language
1399
+ # support for
1400
+ # customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
1398
1401
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1399
1402
  def list_language_models(language: nil)
1400
1403
  headers = {
@@ -2513,8 +2516,12 @@ module IBMWatson
2513
2516
  # **See also:** [Listing custom acoustic
2514
2517
  # models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageAcousticModels#listModels-acoustic).
2515
2518
  # @param language [String] The identifier of the language for which custom language or custom acoustic models
2516
- # are to be returned (for example, `en-US`). Omit the parameter to see all custom
2517
- # language or custom acoustic models that are owned by the requesting credentials.
2519
+ # are to be returned. Omit the parameter to see all custom language or custom
2520
+ # acoustic models that are owned by the requesting credentials.
2521
+ #
2522
+ # To determine the languages for which customization is available, see [Language
2523
+ # support for
2524
+ # customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-customization#languageSupport).
2518
2525
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2519
2526
  def list_acoustic_models(language: nil)
2520
2527
  headers = {
@@ -2612,14 +2619,14 @@ module IBMWatson
2612
2619
  # it. You must use credentials for the instance of the service that owns a model to
2613
2620
  # train it.
2614
2621
  #
2615
- # The training method is asynchronous. It can take on the order of minutes or hours
2616
- # to complete depending on the total amount of audio data on which the custom
2617
- # acoustic model is being trained and the current load on the service. Typically,
2618
- # training a custom acoustic model takes approximately two to four times the length
2619
- # of its audio data. The actual time depends on the model being trained and the
2620
- # nature of the audio, such as whether the audio is clean or noisy. The method
2621
- # returns an HTTP 200 response code to indicate that the training process has begun.
2622
- #
2622
+ # The training method is asynchronous. Training time depends on the cumulative
2623
+ # amount of audio data that the custom acoustic model contains and the current load
2624
+ # on the service. When you train or retrain a model, the service uses all of the
2625
+ # model's audio data in the training. Training a custom acoustic model takes
2626
+ # approximately as long as the length of its cumulative audio data. For example, it
2627
+ # takes approximately 2 hours to train a model that contains a total of 2 hours of
2628
+ # audio. The method returns an HTTP 200 response code to indicate that the training
2629
+ # process has begun.
2623
2630
  #
2624
2631
  # You can monitor the status of the training by using the **Get a custom acoustic
2625
2632
  # model** method to poll the model's status. Use a loop to check the status once a
@@ -2963,7 +2970,7 @@ module IBMWatson
2963
2970
  # used, their use is strongly discouraged.)
2964
2971
  # * Do not use the name of an audio resource that has already been added to the
2965
2972
  # custom model.
2966
- # @param audio_resource [String] The audio resource that is to be added to the custom acoustic model, an individual
2973
+ # @param audio_resource [File] The audio resource that is to be added to the custom acoustic model, an individual
2967
2974
  # audio file or an archive file.
2968
2975
  #
2969
2976
  # With the `curl` command, use the `--data-binary` option to upload the file for the
@@ -3131,10 +3138,15 @@ module IBMWatson
3131
3138
  # deletes all data for the customer ID, regardless of the method by which the
3132
3139
  # information was added. The method has no effect if no data is associated with the
3133
3140
  # customer ID. You must issue the request with credentials for the same instance of
3134
- # the service that was used to associate the customer ID with the data.
3135
- #
3136
- # You associate a customer ID with data by passing the `X-Watson-Metadata` header
3137
- # with a request that passes the data.
3141
+ # the service that was used to associate the customer ID with the data. You
3142
+ # associate a customer ID with data by passing the `X-Watson-Metadata` header with a
3143
+ # request that passes the data.
3144
+ #
3145
+ # **Note:** If you delete an instance of the service from the service console, all
3146
+ # data associated with that service instance is automatically deleted. This includes
3147
+ # all custom language models, corpora, grammars, and words; all custom acoustic
3148
+ # models and audio resources; all registered endpoints for the asynchronous HTTP
3149
+ # interface; and all data related to speech recognition requests.
3138
3150
  #
3139
3151
  # **See also:** [Information
3140
3152
  # security](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-information-security#information-security).
@@ -13,11 +13,14 @@
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&reg; 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&trade; 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
26
  # Transfer (REST) interface and a WebSocket interface. Both interfaces support plain text
@@ -46,7 +49,7 @@ module IBMWatson
46
49
  class TextToSpeechV1 < IBMCloudSdkCore::BaseService
47
50
  include Concurrent::Async
48
51
  DEFAULT_SERVICE_NAME = "text_to_speech"
49
- DEFAULT_SERVICE_URL = "https://stream.watsonplatform.net/text-to-speech/api"
52
+ DEFAULT_SERVICE_URL = "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
50
53
  ##
51
54
  # @!method initialize(args)
52
55
  # Construct a new client for the Text to Speech service.
@@ -78,8 +81,10 @@ module IBMWatson
78
81
  # @!method list_voices
79
82
  # List voices.
80
83
  # Lists all voices available for use with the service. The information includes the
81
- # name, language, gender, and other details about the voice. To see information
82
- # 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.
83
88
  #
84
89
  # **See also:** [Listing all available
85
90
  # voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoices).
@@ -106,14 +111,14 @@ module IBMWatson
106
111
  # Get a voice.
107
112
  # Gets information about the specified voice. The information includes the name,
108
113
  # language, gender, and other details about the voice. Specify a customization ID to
109
- # obtain information for a custom voice model that is defined for the language of
110
- # the specified voice. To list information about all available voices, use the
111
- # **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.
112
117
  #
113
118
  # **See also:** [Listing a specific
114
119
  # voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoice).
115
120
  # @param voice [String] The voice for which information is to be returned.
116
- # @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
117
122
  # returned. You must make the request with credentials for the instance of the
118
123
  # service that owns the custom model. Omit the parameter to see information about
119
124
  # the specified voice with no customization.
@@ -222,8 +227,8 @@ module IBMWatson
222
227
  # specifying an audio format, see **Audio formats (accept types)** in the method
223
228
  # description.
224
229
  # @param voice [String] The voice to use for synthesis.
225
- # @param customization_id [String] The customization ID (GUID) of a custom voice model to use for the synthesis. If a
226
- # custom voice model is specified, it works only if it matches the language of the
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
227
232
  # indicated voice. You must make the request with credentials for the instance of
228
233
  # the service that owns the custom model. Omit the parameter to use the specified
229
234
  # voice with no customization.
@@ -268,9 +273,7 @@ module IBMWatson
268
273
  # Gets the phonetic pronunciation for the specified word. You can request the
269
274
  # pronunciation for a specific format. You can also request the pronunciation for a
270
275
  # specific voice to see the default translation for the language of that voice or
271
- # for a specific custom voice model to see the translation for that voice model.
272
- #
273
- # **Note:** This method is currently a beta release.
276
+ # for a specific custom model to see the translation for that model.
274
277
  #
275
278
  # **See also:** [Querying a word from a
276
279
  # language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
@@ -281,13 +284,13 @@ module IBMWatson
281
284
  # @param format [String] The phoneme format in which to return the pronunciation. The Arabic, Chinese,
282
285
  # Dutch, and Korean languages support only IPA. Omit the parameter to obtain the
283
286
  # pronunciation in the default format.
284
- # @param customization_id [String] The customization ID (GUID) of a custom voice model for which the pronunciation is
285
- # to be returned. The language of a specified custom model must match the language
286
- # of the specified voice. If the word is not defined in the specified custom model,
287
- # the service returns the default translation for the custom model's language. You
288
- # must make the request with credentials for the instance of the service that owns
289
- # the custom model. Omit the parameter to see the translation for the specified
290
- # voice with no customization.
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.
291
294
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
292
295
  def get_pronunciation(text:, voice: nil, format: nil, customization_id: nil)
293
296
  raise ArgumentError.new("text must be provided") if text.nil?
@@ -320,31 +323,28 @@ module IBMWatson
320
323
  #########################
321
324
 
322
325
  ##
323
- # @!method create_voice_model(name:, language: nil, description: nil)
326
+ # @!method create_custom_model(name:, language: nil, description: nil)
324
327
  # Create a custom model.
325
- # 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
326
329
  # model. You can optionally specify the language and a description for the new
327
330
  # model. The model is owned by the instance of the service whose credentials are
328
331
  # used to create it.
329
332
  #
330
- # **Note:** This method is currently a beta release.
331
- #
332
333
  # **See also:** [Creating a custom
333
334
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
334
- # @param name [String] The name of the new custom voice model.
335
- # @param language [String] The language of the new custom voice model. You create a custom voice model for a
336
- # specific language, not for a specific voice. A custom model can be used with any
337
- # voice, standard or neural, for its specified language. Omit the parameter to use
338
- # the the default language, `en-US`.
339
- # @param description [String] A description of the new custom voice model. Specifying a description is
340
- # recommended.
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
339
+ # default language, `en-US`.
340
+ # @param description [String] A description of the new custom model. Specifying a description is recommended.
341
341
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
342
- def create_voice_model(name:, language: nil, description: nil)
342
+ def create_custom_model(name:, language: nil, description: nil)
343
343
  raise ArgumentError.new("name must be provided") if name.nil?
344
344
 
345
345
  headers = {
346
346
  }
347
- 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")
348
348
  headers.merge!(sdk_headers)
349
349
 
350
350
  data = {
@@ -366,27 +366,25 @@ module IBMWatson
366
366
  end
367
367
 
368
368
  ##
369
- # @!method list_voice_models(language: nil)
369
+ # @!method list_custom_models(language: nil)
370
370
  # List custom models.
371
- # Lists metadata such as the name and description for all custom voice models that
372
- # are owned by an instance of the service. Specify a language to list the voice
373
- # models for that language only. To see the words in addition to the metadata for a
374
- # 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
375
375
  # credentials for the instance of the service that owns a model to list information
376
376
  # about it.
377
377
  #
378
- # **Note:** This method is currently a beta release.
379
- #
380
378
  # **See also:** [Querying all custom
381
379
  # models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQueryAll).
382
- # @param language [String] The language for which custom voice models that are owned by the requesting
383
- # credentials are to be returned. Omit the parameter to see all custom voice models
384
- # 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.
385
383
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
386
- def list_voice_models(language: nil)
384
+ def list_custom_models(language: nil)
387
385
  headers = {
388
386
  }
389
- 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")
390
388
  headers.merge!(sdk_headers)
391
389
 
392
390
  params = {
@@ -406,14 +404,14 @@ module IBMWatson
406
404
  end
407
405
 
408
406
  ##
409
- # @!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)
410
408
  # Update a custom model.
411
- # Updates information for the specified custom voice model. You can update metadata
412
- # such as the name and description of the voice model. You can also update the words
413
- # in the model and their translations. Adding a new translation for a word that
414
- # already exists in a custom model overwrites the word's existing translation. A
415
- # custom model can contain no more than 20,000 entries. You must use credentials for
416
- # 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.
417
415
  #
418
416
  # You can define sounds-like or phonetic translations for words. A sounds-like
419
417
  # translation consists of one or more words that, when combined, sound like the
@@ -429,8 +427,6 @@ module IBMWatson
429
427
  # <code>&lt;phoneme alphabet="ibm"
430
428
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
431
429
  #
432
- # **Note:** This method is currently a beta release.
433
- #
434
430
  # **See also:**
435
431
  # * [Updating a custom
436
432
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsUpdate)
@@ -438,20 +434,20 @@ module IBMWatson
438
434
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
439
435
  # * [Understanding
440
436
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
441
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
442
- # with credentials for the instance of the service that owns the custom model.
443
- # @param name [String] A new name for the custom voice model.
444
- # @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.
445
441
  # @param words [Array[Word]] An array of `Word` objects that provides the words and their translations that are
446
- # 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
447
443
  # additions or updates.
448
444
  # @return [nil]
449
- 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)
450
446
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
451
447
 
452
448
  headers = {
453
449
  }
454
- 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")
455
451
  headers.merge!(sdk_headers)
456
452
 
457
453
  data = {
@@ -473,26 +469,24 @@ module IBMWatson
473
469
  end
474
470
 
475
471
  ##
476
- # @!method get_voice_model(customization_id:)
472
+ # @!method get_custom_model(customization_id:)
477
473
  # Get a custom model.
478
- # Gets all information about a specified custom voice model. In addition to metadata
479
- # such as the name and description of the voice model, the output includes the words
480
- # and their translations as defined in the model. To see just the metadata for a
481
- # voice model, use the **List custom models** method.
482
- #
483
- # **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.
484
478
  #
485
479
  # **See also:** [Querying a custom
486
480
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQuery).
487
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
488
- # 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.
489
483
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
490
- def get_voice_model(customization_id:)
484
+ def get_custom_model(customization_id:)
491
485
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
492
486
 
493
487
  headers = {
494
488
  }
495
- 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")
496
490
  headers.merge!(sdk_headers)
497
491
 
498
492
  method_url = "/v1/customizations/%s" % [ERB::Util.url_encode(customization_id)]
@@ -507,24 +501,22 @@ module IBMWatson
507
501
  end
508
502
 
509
503
  ##
510
- # @!method delete_voice_model(customization_id:)
504
+ # @!method delete_custom_model(customization_id:)
511
505
  # Delete a custom model.
512
- # Deletes the specified custom voice model. You must use credentials for the
513
- # instance of the service that owns a model to delete it.
514
- #
515
- # **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.
516
508
  #
517
509
  # **See also:** [Deleting a custom
518
510
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsDelete).
519
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
520
- # 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.
521
513
  # @return [nil]
522
- def delete_voice_model(customization_id:)
514
+ def delete_custom_model(customization_id:)
523
515
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
524
516
 
525
517
  headers = {
526
518
  }
527
- 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")
528
520
  headers.merge!(sdk_headers)
529
521
 
530
522
  method_url = "/v1/customizations/%s" % [ERB::Util.url_encode(customization_id)]
@@ -544,7 +536,7 @@ module IBMWatson
544
536
  ##
545
537
  # @!method add_words(customization_id:, words:)
546
538
  # Add custom words.
547
- # 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.
548
540
  # Adding a new translation for a word that already exists in a custom model
549
541
  # overwrites the word's existing translation. A custom model can contain no more
550
542
  # than 20,000 entries. You must use credentials for the instance of the service that
@@ -564,8 +556,6 @@ module IBMWatson
564
556
  # <code>&lt;phoneme alphabet="ibm"
565
557
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
566
558
  #
567
- # **Note:** This method is currently a beta release.
568
- #
569
559
  # **See also:**
570
560
  # * [Adding multiple words to a custom
571
561
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsAdd)
@@ -573,15 +563,15 @@ module IBMWatson
573
563
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
574
564
  # * [Understanding
575
565
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
576
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
577
- # 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.
578
568
  # @param words [Array[Word]] The **Add custom words** method accepts an array of `Word` objects. Each object
579
- # provides a word that is to be added or updated for the custom voice model and the
580
- # word's translation.
569
+ # provides a word that is to be added or updated for the custom model and the word's
570
+ # translation.
581
571
  #
582
572
  # The **List custom words** method returns an array of `Word` objects. Each object
583
- # shows a word and its translation from the custom voice model. The words are listed
584
- # 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
585
575
  # array is empty if the custom model contains no words.
586
576
  # @return [nil]
587
577
  def add_words(customization_id:, words:)
@@ -613,17 +603,14 @@ module IBMWatson
613
603
  ##
614
604
  # @!method list_words(customization_id:)
615
605
  # List custom words.
616
- # Lists all of the words and their translations for the specified custom voice
617
- # model. The output shows the translations as they are defined in the model. You
618
- # must use credentials for the instance of the service that owns a model to list its
619
- # words.
620
- #
621
- # **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.
622
609
  #
623
610
  # **See also:** [Querying all words from a custom
624
611
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryModel).
625
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
626
- # 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.
627
614
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
628
615
  def list_words(customization_id:)
629
616
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -647,11 +634,11 @@ module IBMWatson
647
634
  ##
648
635
  # @!method add_word(customization_id:, word:, translation:, part_of_speech: nil)
649
636
  # Add a custom word.
650
- # Adds a single word and its translation to the specified custom voice model. Adding
651
- # a new translation for a word that already exists in a custom model overwrites the
652
- # word's existing translation. A custom model can contain no more than 20,000
653
- # entries. You must use credentials for the instance of the service that owns a
654
- # 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.
655
642
  #
656
643
  # You can define sounds-like or phonetic translations for words. A sounds-like
657
644
  # translation consists of one or more words that, when combined, sound like the
@@ -667,8 +654,6 @@ module IBMWatson
667
654
  # <code>&lt;phoneme alphabet="ibm"
668
655
  # ph="1gAstroEntxrYFXs"&gt;&lt;/phoneme&gt;</code>
669
656
  #
670
- # **Note:** This method is currently a beta release.
671
- #
672
657
  # **See also:**
673
658
  # * [Adding a single word to a custom
674
659
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordAdd)
@@ -676,9 +661,9 @@ module IBMWatson
676
661
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
677
662
  # * [Understanding
678
663
  # customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
679
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
680
- # with credentials for the instance of the service that owns the custom model.
681
- # @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.
682
667
  # @param translation [String] The phonetic or sounds-like translation for the word. A phonetic translation is
683
668
  # based on the SSML format for representing the phonetic string of a word either as
684
669
  # an IPA translation or as an IBM SPR translation. The Arabic, Chinese, Dutch, and
@@ -727,13 +712,11 @@ module IBMWatson
727
712
  # shows the translation as it is defined in the model. You must use credentials for
728
713
  # the instance of the service that owns a model to list its words.
729
714
  #
730
- # **Note:** This method is currently a beta release.
731
- #
732
715
  # **See also:** [Querying a single word from a custom
733
716
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordQueryModel).
734
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
735
- # with credentials for the instance of the service that owns the custom model.
736
- # @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.
737
720
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
738
721
  def get_word(customization_id:, word:)
739
722
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -759,17 +742,14 @@ module IBMWatson
759
742
  ##
760
743
  # @!method delete_word(customization_id:, word:)
761
744
  # Delete a custom word.
762
- # Deletes a single word from the specified custom voice model. You must use
763
- # credentials for the instance of the service that owns a model to delete its words.
764
- #
765
- #
766
- # **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.
767
747
  #
768
748
  # **See also:** [Deleting a word from a custom
769
749
  # model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordDelete).
770
- # @param customization_id [String] The customization ID (GUID) of the custom voice model. You must make the request
771
- # with credentials for the instance of the service that owns the custom model.
772
- # @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.
773
753
  # @return [nil]
774
754
  def delete_word(customization_id:, word:)
775
755
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
@@ -802,10 +782,14 @@ module IBMWatson
802
782
  # deletes all data for the customer ID, regardless of the method by which the
803
783
  # information was added. The method has no effect if no data is associated with the
804
784
  # customer ID. You must issue the request with credentials for the same instance of
805
- # the service that was used to associate the customer ID with the data.
806
- #
807
- # You associate a customer ID with data by passing the `X-Watson-Metadata` header
808
- # 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.
809
793
  #
810
794
  # **See also:** [Information
811
795
  # security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-information-security#information-security).