From a47313079b9ed3df981d57b0742f48f3c0f99e42 Mon Sep 17 00:00:00 2001 From: Gus Class Date: Thu, 13 Apr 2017 16:04:13 -0700 Subject: [PATCH] Speech version bump [(#899)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/899) * Changes docs for async playback to point to LINEAR16 example * Updates to client library with FLAC support. * Changes async examples to flac and updates README --- .../google-cloud-speech/samples/snippets/requirements.txt | 2 +- .../google-cloud-speech/samples/snippets/transcribe_async.py | 4 ++-- .../samples/snippets/transcribe_async_test.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-speech/samples/snippets/requirements.txt b/packages/google-cloud-speech/samples/snippets/requirements.txt index deb66fcac830..3e58ad573f81 100644 --- a/packages/google-cloud-speech/samples/snippets/requirements.txt +++ b/packages/google-cloud-speech/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-speech==0.25.0 +google-cloud-speech==0.25.1 diff --git a/packages/google-cloud-speech/samples/snippets/transcribe_async.py b/packages/google-cloud-speech/samples/snippets/transcribe_async.py index 8457871b3d7a..bbf67355308e 100644 --- a/packages/google-cloud-speech/samples/snippets/transcribe_async.py +++ b/packages/google-cloud-speech/samples/snippets/transcribe_async.py @@ -19,7 +19,7 @@ Example usage: python transcribe_async.py resources/audio.raw - python transcribe_async.py gs://cloud-samples-tests/speech/brooklyn.raw + python transcribe_async.py gs://cloud-samples-tests/speech/brooklyn.flac """ import argparse @@ -67,7 +67,7 @@ def transcribe_gcs(gcs_uri): audio_sample = speech_client.sample( content=None, source_uri=gcs_uri, - encoding='LINEAR16', + encoding='FLAC', sample_rate_hertz=16000) operation = audio_sample.long_running_recognize('en-US') diff --git a/packages/google-cloud-speech/samples/snippets/transcribe_async_test.py b/packages/google-cloud-speech/samples/snippets/transcribe_async_test.py index 8d719753d12a..7d66747eb446 100644 --- a/packages/google-cloud-speech/samples/snippets/transcribe_async_test.py +++ b/packages/google-cloud-speech/samples/snippets/transcribe_async_test.py @@ -29,7 +29,7 @@ def test_transcribe(capsys): def test_transcribe_gcs(capsys): transcribe_async.transcribe_gcs( - 'gs://python-docs-samples-tests/speech/audio.raw') + 'gs://python-docs-samples-tests/speech/audio.flac') out, err = capsys.readouterr() assert re.search(r'how old is the Brooklyn Bridge', out, re.DOTALL | re.I)