Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
fix: migrated to speech 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
b-loved-dreamer committed Oct 2, 2020
1 parent e56bef8 commit debef7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions samples/microphone/transcribe_streaming_infinite.py
Expand Up @@ -242,6 +242,7 @@ def main():
sample_rate_hertz=SAMPLE_RATE,
language_code='en-US',
max_alternatives=1)

streaming_config = speech.StreamingRecognitionConfig(
config=config,
interim_results=True)
Expand Down
1 change: 1 addition & 0 deletions samples/microphone/transcribe_streaming_mic.py
Expand Up @@ -171,6 +171,7 @@ def main():
encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=RATE,
language_code=language_code)

streaming_config = speech.StreamingRecognitionConfig(
config=config,
interim_results=True)
Expand Down
4 changes: 1 addition & 3 deletions samples/snippets/quickstart.py
Expand Up @@ -33,9 +33,7 @@ def run_quickstart():

# The name of the audio file to transcribe
file_name = os.path.join(
os.path.dirname(__file__),
'resources',
'audio.raw')
os.path.dirname(__file__), 'resources', 'audio.raw')

# Loads the audio into memory
with io.open(file_name, 'rb') as audio_file:
Expand Down

0 comments on commit debef7d

Please sign in to comment.