GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.48k stars 6.45k forks source link

Automatic Spoken Language Detection HANGING #1854

Closed NeoLuk closed 5 years ago

NeoLuk commented 6 years ago

In which file did you encounter the issue?

python-docs-samples/speech/cloud-client/transcribe_streaming_mic.py

Did you change the file? If so, how?

Changes to the following lines were made:

language_code=language_code,

to

language_code=language_code,
lternative_language_codes=['yue-Hant-HK', 'cmn-Hans-CN'],

Describe the issue

Recognition works normally when the spoken text is above certain length. When the input is short, responses from

client.streaming_recognize(audio_content=content) for content in audio_generator)

hangs without spitting any results (both final and interim). Oddly enough, if I were to say any random word, or even to just make some noise, the hanging goes away, and I get ALL interim and final recognized text all in one lump.

The code used to work fine. The problem was first spotted since Friday Nov 16th, and has persisted since then. Any help will be greatly appreciated. Thanks.

nnegrey commented 5 years ago

Hi, yea it does seem to hang for this sample on the initial request.

I'll pass this along. Please note that automatic language detection is still in beta.

nnegrey commented 5 years ago

Hi, I tried it again today and beside a slight delay on the first detection (likely to identify the spoken language) this seems to be working now.

Feel free to reopen the issue if that is not the case. :)