ibm_watson 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eb3dece96d55c7c9cf48e0e2e85912e1b044710c6483f7f39c1993c9e7ce0ed
4
- data.tar.gz: db5d372a1e33c321f3c4e0156d777513909872e48b87d81e0a5eadbb661ef30e
3
+ metadata.gz: b55686114aadfb84334751c7e31f29944e2993349a8445d76d6cd4bc671bcec9
4
+ data.tar.gz: 18c1223dc6035601ece235203b2bc0d2e4f0f7eb44f7122fdb388e9de8d066d6
5
5
  SHA512:
6
- metadata.gz: a7af1ca50217a8900f58b4599aafd28e7f376283f631a4e99fef5bae499e47a0315af2b573e99fb08377f00d0f33a6c2ac2b4ab50b69633d1f785c7bc9482d3d
7
- data.tar.gz: daa066a5ff004c629c069d123619fa6e1da2074af5e5d0323cc824d41bce9c34c07209a74be159ba737976c37ab095dd32c43257723dbb0f99a2aa52016a9332
6
+ metadata.gz: 88ef64f14a15d3c87039f12829bac1e0e8083da880a5f67cb7c01be9c05f18f070637ebf5ee0d9b35554a951db0fe2b5ceab6612d774c95772afd47596fa4fe1
7
+ data.tar.gz: fb3bd6d9032fb8209ca473ffb047017f778e690378e383898cdc285a6034f1a4f5b9c5ec21d28e3016630252a4f34f6062da1cc4b022baf80adc1338f3bfa6ca
@@ -146,7 +146,7 @@ module IBMWatson
146
146
  #########################
147
147
 
148
148
  ##
149
- # @!method recognize(audio:, content_type:, model: nil, language_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, customization_id: nil)
149
+ # @!method recognize(audio:, content_type: nil, model: nil, language_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, customization_id: nil)
150
150
  # Recognize audio.
151
151
  # Sends audio and returns transcription results for a recognition request. Returns
152
152
  # only the final results; to enable interim results, use the WebSocket API. The
@@ -322,11 +322,9 @@ module IBMWatson
322
322
  # customization ID (GUID) of a custom language model that is to be used with the
323
323
  # recognition request. Do not specify both parameters with a request.
324
324
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
325
- def recognize(audio:, content_type:, model: nil, language_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, customization_id: nil)
325
+ def recognize(audio:, content_type: nil, model: nil, language_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, customization_id: nil)
326
326
  raise ArgumentError("audio must be provided") if audio.nil?
327
327
 
328
- raise ArgumentError("content_type must be provided") if content_type.nil?
329
-
330
328
  headers = {
331
329
  "Content-Type" => content_type
332
330
  }
@@ -362,14 +360,15 @@ module IBMWatson
362
360
  end
363
361
 
364
362
  ##
365
- # @!method recognize_using_websocket(content_type:,recognize_callback:,audio: nil,chunk_data: false,model: nil,customization_id: nil,acoustic_customization_id: nil,customization_weight: nil,base_model_version: nil,inactivity_timeout: nil,interim_results: 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)
363
+ # @!method recognize_using_websocket(content_type: nil,recognize_callback:,audio: nil,chunk_data: false,model: nil,customization_id: nil,language_customization_id: nil,acoustic_customization_id: nil,customization_weight: nil,base_model_version: nil,inactivity_timeout: nil,interim_results: 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)
366
364
  # Sends audio for speech recognition using web sockets.
367
365
  # @param content_type [String] The type of the input: audio/basic, audio/flac, audio/l16, audio/mp3, audio/mpeg, audio/mulaw, audio/ogg, audio/ogg;codecs=opus, audio/ogg;codecs=vorbis, audio/wav, audio/webm, audio/webm;codecs=opus, audio/webm;codecs=vorbis, or multipart/form-data.
368
366
  # @param recognize_callback [RecognizeCallback] The instance handling events returned from the service.
369
367
  # @param audio [IO] Audio to transcribe in the format specified by the `Content-Type` header.
370
368
  # @param chunk_data [Boolean] If true, then the WebSocketClient will expect to receive data in chunks rather than as a single audio file
371
369
  # @param model [String] The identifier of the model to be used for the recognition request.
372
- # @param customization_id [String] The GUID of a custom language model that is to be used with the request. The base model of the specified custom language model must match the model specified with the `model` parameter. You must make the request with service credentials created for the instance of the service that owns the custom model. By default, no custom language model is used.
370
+ # @param language_customization_id [String] The GUID of a custom language model that is to be used with the request. The base model of the specified custom language model must match the model specified with the `model` parameter. You must make the request with service credentials created for the instance of the service that owns the custom model. By default, no custom language model is used.
371
+ # @param customization_id [String] **Deprecated.** Use the `language_customization_id` parameter to specify the customization ID (GUID) of a custom language model that is to be used with the recognition request. Do not specify both parameters with a request.
373
372
  # @param acoustic_customization_id [String] The GUID of a custom acoustic model that is to be used with the request. The base model of the specified custom acoustic model must match the model specified with the `model` parameter. You must make the request with service credentials created for the instance of the service that owns the custom model. By default, no custom acoustic model is used.
374
373
  # @param customization_weight [Float] If you specify a `customization_id` with the request, you can use the `customization_weight` parameter to tell the service how much weight to give to words from the custom language model compared to those from the base model for speech recognition. Specify a value between 0.0 and 1.0. Unless a different customization weight was specified for the custom model when it was trained, the default value is 0.3. A customization weight that you specify overrides a weight that was specified when the custom model was trained. The default value yields the best performance in general. Assign a higher value if your audio makes frequent use of OOV words from the custom model. Use caution when setting the weight: a higher value can improve the accuracy of phrases from the custom model's domain, but it can negatively affect performance on non-domain phrases.
375
374
  # @param base_model_version [String] The version of the specified base `model` that is to be used for speech recognition. Multiple versions of a base model can exist when a model is updated for internal improvements. The parameter is intended primarily for use with custom models that have been upgraded for a new base model. The default value depends on whether the parameter is used with or without a custom model. For more information, see [Base model version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
@@ -386,11 +385,12 @@ module IBMWatson
386
385
  # @param speaker_labels [Boolean] Indicates whether labels that identify which words were spoken by which participants in a multi-person exchange are to be included in the response. The default is `false`; no speaker labels are returned. Setting `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify `false` for the parameter. To determine whether a language model supports speaker labels, use the `GET /v1/models` method and check that the attribute `speaker_labels` is set to `true`. You can also refer to [Speaker labels](https://console.bluemix.net/docs/services/speech-to-text/output.html#speaker_labels).
387
386
  # @return [WebSocketClient] Returns a new WebSocketClient object
388
387
  def recognize_using_websocket(
389
- content_type:,
388
+ content_type: nil,
390
389
  recognize_callback:,
391
390
  audio: nil,
392
391
  chunk_data: false,
393
392
  model: nil,
393
+ language_customization_id: nil,
394
394
  customization_id: nil,
395
395
  acoustic_customization_id: nil,
396
396
  customization_weight: nil,
@@ -424,6 +424,7 @@ module IBMWatson
424
424
  params = {
425
425
  "model" => model,
426
426
  "customization_id" => customization_id,
427
+ "langauge_customization_id" => language_customization_id,
427
428
  "acoustic_customization_id" => acoustic_customization_id,
428
429
  "customization_weight" => customization_weight,
429
430
  "base_model_version" => base_model_version
@@ -451,7 +452,7 @@ module IBMWatson
451
452
  # :nocov:
452
453
  # @deprecated This will method be removed in the next major release. Use {#recognize_using_websocket} instead.
453
454
  def recognize_with_websocket(
454
- content_type:,
455
+ content_type: nil,
455
456
  recognize_callback:,
456
457
  audio: nil,
457
458
  chunk_data: false,
@@ -600,7 +601,7 @@ module IBMWatson
600
601
  end
601
602
 
602
603
  ##
603
- # @!method create_job(audio:, content_type:, model: nil, callback_url: nil, events: nil, user_token: nil, results_ttl: nil, language_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, customization_id: nil)
604
+ # @!method create_job(audio:, content_type: nil, model: nil, callback_url: nil, events: nil, user_token: nil, results_ttl: nil, language_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, customization_id: nil)
604
605
  # Create a job.
605
606
  # Creates a job for a new asynchronous recognition request. The job is owned by the
606
607
  # user whose service credentials are used to create it. How you learn the status and
@@ -822,11 +823,9 @@ module IBMWatson
822
823
  # customization ID (GUID) of a custom language model that is to be used with the
823
824
  # recognition request. Do not specify both parameters with a request.
824
825
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
825
- def create_job(audio:, content_type:, model: nil, callback_url: nil, events: nil, user_token: nil, results_ttl: nil, language_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, customization_id: nil)
826
+ def create_job(audio:, content_type: nil, model: nil, callback_url: nil, events: nil, user_token: nil, results_ttl: nil, language_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, customization_id: nil)
826
827
  raise ArgumentError("audio must be provided") if audio.nil?
827
828
 
828
- raise ArgumentError("content_type must be provided") if content_type.nil?
829
-
830
829
  headers = {
831
830
  "Content-Type" => content_type
832
831
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IBMWatson
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_watson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Nussbaum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-31 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -314,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
314
  version: '0'
315
315
  requirements: []
316
316
  rubyforge_project:
317
- rubygems_version: 2.7.7
317
+ rubygems_version: 2.7.8
318
318
  signing_key:
319
319
  specification_version: 4
320
320
  summary: Official client library to use the IBM Watson Services