Open zinnen opened 1 year ago
From the perspective of the sample, there is nothing wrong and if speech is recognised it will be marked as is_final.
I was able to reproduce this and created few sample audio files to play with in different languages (https://github.com/GoogleCloudPlatform/python-docs-samples/pull/11868). As a matter of fact, I was playing those audio files via built-in speaker and most of the samples were recognised to final state (except french in all the cases), when I were in quiet space without any other sounds. If there will be background noises, the words still get transcribed, but the result won't be marked as final.
Reported to the product team as 349812897. Waiting for their response.
In which file did you encounter the issue?
python-docs-samples/speech/microphone/transcribe_streaming_mic.py
Did you change the file? If so, how?
add credentials in the beginning
change language_code to de-DE or fr-FR
line 174 ff (just print the transcript and the is_final state continue afterwards)
transcript = result.alternatives[0].transcript print(transcript, result.is_final) continue
Describe the issue
in English, the is_final state will turn to true (everything works fine), but does not for German, French or Spanish the end of sequence is not detected or returned
Please replace *.json by the real json-file-name githubSpeechToText.txt