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 API python client library method streaming_recognize() doesn't return a result with is_final set to True #12570

Open
nikaided opened this issue Sep 8, 2024 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@nikaided
Copy link

nikaided commented Sep 8, 2024

In which file did you encounter the issue?

Did you change the file? If so, how?

I have changed the line 299

 config = speech.RecognitionConfig(
        encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
        sample_rate_hertz=SAMPLE_RATE,
        language_code="en-US",
        max_alternatives=1,
    )

into

 config = speech.RecognitionConfig(
        encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
        sample_rate_hertz=SAMPLE_RATE,
        language_code="ja-JP",
        max_alternatives=1,
    )

Describe the issue

streaming_recognize() method doesn't work properly. For even when a speaker utters a simple greeting like こんにちは in a very silent environment, this method returns StreamingRecognizeResponse object with a result of is_final == False. And always returns a result with is_final set to True exactly 90 seconds later.
this doesn't happen when the language is English or Chinese.
The same thing also happens in transcribe_streaming_infinite_v2.py

I am not sure if this report should be post here for this seems to be more internal problem.
Appreciate any help or clues anyways.

@nikaided nikaided added priority: p2 Moderately-important priority. Fix may not be included in next release. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 8, 2024
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants