lib/google/cloud/speech/stream.rb in google-cloud-speech-0.24.0 vs lib/google/cloud/speech/stream.rb in google-cloud-speech-0.25.0
- old
+ new
@@ -29,11 +29,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -94,11 +94,11 @@
#
# speech = Google::Cloud::Speech.new
#
# audio = speech.audio "path/to/audio.raw"
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -153,11 +153,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -187,11 +187,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -222,11 +222,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -264,11 +264,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # register callback for when an interim result is returned
# stream.on_interim do |final_results, interim_results|
@@ -310,11 +310,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # Stream 5 seconds of audio from the microphone
# # Actual implementation of microphone input varies by platform
@@ -355,11 +355,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # register callback for when stream has ended.
# stream.on_complete do
@@ -402,11 +402,11 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000,
# utterance: true
#
# # register callback for when utterance has occurred.
@@ -447,10 +447,10 @@
# @example
# require "google/cloud/speech"
#
# speech = Google::Cloud::Speech.new
#
- # stream = speech.stream encoding: :raw,
+ # stream = speech.stream encoding: :linear16,
# language: "en-US",
# sample_rate: 16000
#
# # register callback for when an error is returned
# stream.on_error do |error|