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 ?
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 ?