GoogleCloudPlatform / android-docs-samples

Apache License 2.0
375 stars 596 forks source link

How to Stop Recognition #111

Open shaohui93 opened 4 years ago

shaohui93 commented 4 years ago

I use SpeechRecognitionClient examples for speech recognition. How do I stop active recognition? Here's the code I started identifying. mSpeechClient.streamingRecognizeCallable() .bidiStreamingCall()

I stop with the following code, an exception appears, and then I can't recognize it again.、 mAudioEmitter?.stop() mAudioEmitter = null

Abnormal information is as follows an error occurredio.grpc.StatusRuntimeException: CANCELLED: Failed to read message.

Actively stop recognizing if something needs to be done