GoogleCloudPlatform / android-docs-samples

Apache License 2.0
373 stars 594 forks source link

Why there is a restriction for MAX_SPEECH_LENGTH #26

Open dj-4war opened 7 years ago

dj-4war commented 7 years ago

We see that there is a delay when there is no speech is recognized after certain time and start the speech after 30 sec. if (now - mVoiceStartedMillis > MAX_SPEECH_LENGTH_MILLIS) { end(); } } else if (mLastVoiceHeardMillis != Long.MAX_VALUE) { mCallback.onVoice(mBuffer, size); if (now - mLastVoiceHeardMillis > SPEECH_TIMEOUT_MILLIS) { end(); } Any specific reason that it needs to be end and start again after MAX_SPEECH_LENGTH_MILLIS(30sec)and Speech Timeout i.e 20 sec ?