Created
December 9, 2021 19:35
-
-
Save michelbl/9b192ef5bcfafc80280487442dc279d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.cloud import speech | |
client = speech.SpeechClient() | |
audio = speech.RecognitionAudio(uri="gs://speech-data-895/source_2_flac.wav") | |
config = speech.RecognitionConfig( | |
language_code="fr-FR", | |
) | |
response = client.long_running_recognize( | |
config=config, | |
audio=audio, | |
) | |
for result in response.results: | |
print("Transcript: {}".format(result.alternatives[0].transcript)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment