Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech GCS #784

Merged
merged 3 commits into from
Feb 7, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
import modules not functions
  • Loading branch information
gguuss committed Feb 7, 2017
commit cede16c3d8d86e8bdbe53d44a8a25f547a633c08
7 changes: 4 additions & 3 deletions speech/cloud-client/transcribe_async_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@

import re

from transcribe_async import transcribe_file, transcribe_gcs
import transcribe_async


def test_transcribe(resource, capsys):
transcribe_file(resource('audio.raw'))
transcribe_async.transcribe_file(resource('audio.raw'))
out, err = capsys.readouterr()

assert re.search(r'how old is the Brooklyn Bridge', out, re.DOTALL | re.I)


def test_transcribe_gcs(resource, capsys):
transcribe_gcs('gs://python-docs-samples-tests/speech/audio.flac')
transcribe_async.transcribe_gcs(
'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)
7 changes: 4 additions & 3 deletions speech/cloud-client/transcribe_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@

import re

from transcribe import transcribe_file, transcribe_gcs
import transcribe


def test_transcribe_file(resource, capsys):
transcribe_file(resource('audio.raw'))
transcribe.transcribe_file(resource('audio.raw'))
out, err = capsys.readouterr()

assert re.search(r'how old is the Brooklyn Bridge', out, re.DOTALL | re.I)


def test_transcribe_gcs(resource, capsys):
transcribe_gcs('gs://python-docs-samples-tests/speech/audio.flac')
transcribe.transcribe_gcs(
'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)