GoogleCloudPlatform / GoogleCloudPlatform/python-docs-samples

Speech API python client library method `streaming_recognize()` doesn't return a result with `is_final` set to True

オープン
#12,570 コメント 1 件 リアクション 0 件 担当者 1 名 @engelke が担当を希望しています GitHub で見る
priority: p2 samples triage me type: bug
主要言語
Jupyter Notebook
スター
8.1k
フォーク
6.7k
平均マージ
4日 2時間
マージ済み PR(30日)
16

説明

## In which file did you encounter the issue?
- https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/speech/microphone/transcribe_streaming_infinite.py

## 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。