GoogleCloudPlatform / android-docs-samples

Apache License 2.0
375 stars 596 forks source link

Stop Recognisition after max speech time out #119

Open Santhu opened 4 years ago

Santhu commented 4 years ago

Hello,

case1 when used with the sample when max speech time out is reached it again start the voice started and again continue listening.when we are doing stop audio and finish recognition also its not stopping. after searching googling found out the stop API is holding a thread lock which i removed later.

case2 when you start the recognition and don't utter anything after specific reach of time it should break the loop which is not happening. And in this case isHearing api is giving true(might be they are not cancelling noise).

case3 when you wifi and mobile is off and when you ON the mobile data and when we start the activity and check isNetwork is connected true and start the recognition then its throwing onError in private final StreamObserver mResponseObserver = new StreamObserver()

Error calling the API.java.net.UnknownHostException: Unable to resolve host "speech.googleapis.com": No address associated with hostname

Can we have simple sample with button to start the recognition and stop button to stop it. and if we dont speak it should stop itself after few seconds

thanks Santhosh