@Meixuan MX4 Luo I tried Android example but didn't repro in 4 hour audio.
Could you please refer the sample code. (for example, start, stop and close recognizer...) ? Awaiting your reply.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I built a voice assistant, and after conversing for a while, the following error occurred in the voice recognition:
Error: ErrorCode=RuntimeError, ErrorDetails=0x15 (SPXERR_MIC_ERROR)
My calling method is as follows. Could you please tell me why this problem occurred and how to solve it?
private fun recognizeFromMicrophone(speechConfig: SpeechConfig?) {
try {
val audioConfig = AudioConfig.fromDefaultMicrophoneInput()
speechRecognizer = SpeechRecognizer(speechConfig, audioConfig)
myRecognizerListener?.onBeginOfSpeech()
recognizingResult = ""
speechRecognizer.recognizing.addEventListener { _, e ->
handleRecognizingEvent(e.result.text)
}
CoroutineScope(Dispatchers.IO).launch {
try {
val speechRecognitionResult: SpeechRecognitionResult = speechRecognizer.recognizeOnceAsync().get()
handleRecognitionResult(speechRecognitionResult)
} catch (e: Exception) {
VoiceLog.error(TAG, "Error: " + e.message)
withContext(Dispatchers.Main) {
myRecognizerListener?.onError(VoiceError("Azure_Recognize_Error_400", e.message ?: "Unknown error"))
}
}
}
} catch (e: Exception) {
VoiceLog.error(TAG, "Error starting speech recognizer: ${e.message}")
}
}
@Meixuan MX4 Luo I tried Android example but didn't repro in 4 hour audio.
Could you please refer the sample code. (for example, start, stop and close recognizer...) ? Awaiting your reply.