cognitive-services-speech-sdk: Hitting error `SPXERR_UNEXPECTED_EOF`

I’m running a big ASR job from tens of thousands of audio files (yes, I know I can use Batch ASR for this…). Occasionally, I am hitting the error below. I have often run data through this script, and I have never seen this particular error before (but this is an updated version of the SDK). It’s possible that there is a very short (or empty) file, but I have not yet been able to track it down, and the error itself does not seem deterministic…

If it matters, I am hitting this endpoint b4fa32b9-30bc-4581-991a-2a069db0b853 and azure.cognitiveservices.speech version 1.13.0 More details on request.

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/anaconda/envs/py37_default/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/userdata/minewman/attic/msasr/fdr_v3/run_asr_file.split.py", line 654, in run_sdk_retry
    results, success_flag = run_sdk(wavefile, debug=debug, speech_key=speech_key, endpoint_id=endpoint_id, service_region=service_region, long_bailout=long_bailout, mode=mode, cancel_slow=cancel_slow, push_mode=push_mode, sim_realtime=sim_realtime, buffer_size=buffer_size, sleepy_time=sleepy_time, fast_mode=fast_mode, format_all=format_all, word_level=word_level)
  File "/userdata/minewman/attic/msasr/fdr_v3/run_asr_file.split.py", line 380, in run_sdk
    speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audioInput)
  File "/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/speech.py", line 798, in __init__
    self._impl = self._get_impl(impl.SpeechRecognizer, speech_config, audio_config, language, source_language_config, auto_detect_source_language_config)
  File "/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/speech.py", line 861, in _get_impl
    return reco_type._from_config(speech_config._impl,  audio_config._impl)
RuntimeError: Exception with an error code: 0x9 (SPXERR_UNEXPECTED_EOF)
[CALL STACK BEGIN]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2fc108) [0x7f9dd03ee108]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2fc2df) [0x7f9dd03ee2df]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2b2648) [0x7f9dd03a4648]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2b8e54) [0x7f9dd03aae54]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x228707) [0x7f9dd031a707]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x226df2) [0x7f9dd0318df2]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2274ea) [0x7f9dd03194ea]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2278e6) [0x7f9dd03198e6]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x162cbb) [0x7f9dd0254cbb]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(recognizer_create_speech_recognizer_from_config+0xe1) [0x7f9dd024b291]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/_speech_py_impl.so(+0x1cf045) [0x7f9dd0c04045]
/home/minewman/work/fdr/venv/lib/python3.7/site-packages/azure/cognitiveservices/speech/_speech_py_impl.so(+0x15d482) [0x7f9dd0b92482]
python(_PyMethodDef_RawFastCallKeywords+0x1e0) [0x55f822ebcc10]
python(_PyCFunction_FastCallKeywords+0x21) [0x55f822ebcdb1]
python(_PyEval_EvalFrameDefault+0x4dee) [0x55f822f285be]
python(_PyFunction_FastCallKeywords+0xfb) [0x55f822ebc20b]
python(_PyEval_EvalFrameDefault+0x4a59) [0x55f822f28229]
[CALL STACK END]```

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

I still don’t see anything. One more try, and if it runs to completion I think we should declare this ‘fixed’

I just ran (what I think is) the same big job and this time did not see any problems. I am going to have to dig a little deeper to make sure I ran the right thing, etc