Skip to content

Commit afaa368

Browse files
fix: Use google-cloud-speech-v1 for samples (#30916)
Co-authored-by: Yoshi Automation Bot <yoshi-automation@google.com>
1 parent c45fac1 commit afaa368

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

google-cloud-speech/samples/speech_samples.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def speech_sync_recognize audio_file_path: nil
1818

1919
require "google/cloud/speech"
2020

21-
speech = Google::Cloud::Speech.speech
21+
speech = Google::Cloud::Speech.speech version: :v1
2222

2323
# [START speech_ruby_migration_sync_response]
2424
audio_file = File.binread audio_file_path
@@ -45,7 +45,7 @@ def speech_sync_recognize_words audio_file_path: nil
4545

4646
require "google/cloud/speech"
4747

48-
speech = Google::Cloud::Speech.speech
48+
speech = Google::Cloud::Speech.speech version: :v1
4949

5050
audio_file = File.binread audio_file_path
5151

@@ -79,7 +79,7 @@ def speech_sync_recognize_gcs storage_path: nil
7979

8080
require "google/cloud/speech"
8181

82-
speech = Google::Cloud::Speech.speech
82+
speech = Google::Cloud::Speech.speech version: :v1
8383

8484
# [START speech_ruby_migration_config_gcs]
8585
config = { encoding: :LINEAR16,
@@ -105,7 +105,7 @@ def speech_async_recognize audio_file_path: nil
105105

106106
require "google/cloud/speech"
107107

108-
speech = Google::Cloud::Speech.speech
108+
speech = Google::Cloud::Speech.speech version: :v1
109109

110110
# [START speech_ruby_migration_async_response]
111111
# [START speech_ruby_migration_async_request]
@@ -140,7 +140,7 @@ def speech_async_recognize_gcs storage_path: nil
140140

141141
require "google/cloud/speech"
142142

143-
speech = Google::Cloud::Speech.speech
143+
speech = Google::Cloud::Speech.speech version: :v1
144144

145145
config = { encoding: :LINEAR16,
146146
sample_rate_hertz: 16_000,
@@ -170,7 +170,7 @@ def speech_async_recognize_gcs_words storage_path: nil
170170

171171
require "google/cloud/speech"
172172

173-
speech = Google::Cloud::Speech.speech
173+
speech = Google::Cloud::Speech.speech version: :v1
174174

175175
config = { encoding: :LINEAR16,
176176
sample_rate_hertz: 16_000,
@@ -207,7 +207,7 @@ def speech_streaming_recognize audio_file_path: nil
207207

208208
require "google/cloud/speech"
209209

210-
speech = Google::Cloud::Speech.speech
210+
speech = Google::Cloud::Speech.speech version: :v1
211211

212212
# [START speech_ruby_migration_streaming_response]
213213
# [START speech_ruby_migration_streaming_request]
@@ -256,7 +256,7 @@ def speech_transcribe_auto_punctuation audio_file_path: nil
256256

257257
require "google/cloud/speech"
258258

259-
speech = Google::Cloud::Speech.speech
259+
speech = Google::Cloud::Speech.speech version: :v1
260260

261261
config = {
262262
encoding: :LINEAR16,
@@ -293,7 +293,7 @@ def speech_transcribe_enhanced_model audio_file_path: nil
293293

294294
require "google/cloud/speech"
295295

296-
speech = Google::Cloud::Speech.speech
296+
speech = Google::Cloud::Speech.speech version: :v1
297297

298298
config = {
299299
encoding: :LINEAR16,
@@ -331,7 +331,7 @@ def speech_transcribe_model_selection file_path: nil, model: nil
331331

332332
require "google/cloud/speech"
333333

334-
speech = Google::Cloud::Speech.speech
334+
speech = Google::Cloud::Speech.speech version: :v1
335335

336336
config = {
337337
encoding: :LINEAR16,
@@ -368,7 +368,7 @@ def speech_transcribe_multichannel audio_file_path: nil
368368

369369
require "google/cloud/speech"
370370

371-
speech = Google::Cloud::Speech.speech
371+
speech = Google::Cloud::Speech.speech version: :v1
372372

373373
config = {
374374
encoding: :LINEAR16,
@@ -401,7 +401,7 @@ def speech_transcribe_multichannel_gcs storage_path: nil
401401

402402
require "google/cloud/speech"
403403

404-
speech = Google::Cloud::Speech.speech
404+
speech = Google::Cloud::Speech.speech version: :v1
405405

406406
config = {
407407
encoding: :LINEAR16,

0 commit comments

Comments
 (0)