question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

always got RuntimeError: Exception with an error code: 0x8 (SPXERR_FILE_OPEN_FAILED)

See original GitHub issue

Describe the bug I wrote Python script to submit a test set with 15000 audio clips(.wav files). I used multithreads to submit 10 files each time, but got the following error every time after ~1000 files is completed:

RuntimeError: Exception with an error code: 0x8 (SPXERR_FILE_OPEN_FAILED)
[CALL STACK BEGIN]

3   libMicrosoft.CognitiveServices.Speech.core.dylib 0x0000000106406aaf CreateModuleObject + 1132863
4   libMicrosoft.CognitiveServices.Speech.core.dylib 0x0000000106404295 CreateModuleObject + 1122597
5   libMicrosoft.CognitiveServices.Speech.core.dylib 0x0000000106404925 CreateModuleObject + 1124277
6   libMicrosoft.CognitiveServices.Speech.core.dylib 0x00000001063004e1 CreateModuleObject + 58225
7   libMicrosoft.CognitiveServices.Speech.core.dylib 0x0000000106340c64 CreateModuleObject + 322292
8   libMicrosoft.CognitiveServices.Speech.core.dylib 0x000000010633fbe5 CreateModuleObject + 318069
9   libMicrosoft.CognitiveServices.Speech.core.dylib 0x000000010633d5a2 CreateModuleObject + 308274
10  libMicrosoft.CognitiveServices.Speech.core.dylib 0x000000010633d7c3 CreateModuleObject + 308819
11  libMicrosoft.CognitiveServices.Speech.core.dylib 0x000000010628fbc7 recognizer_create_speech_recognizer_from_config + 3863
12  libMicrosoft.CognitiveServices.Speech.core.dylib 0x000000010628ed74 recognizer_create_speech_recognizer_from_config + 196
13  _speech_py_impl.so                  0x000000010612e35b PyInit__speech_py_impl + 814939
14  _speech_py_impl.so                  0x00000001060ca530 PyInit__speech_py_impl + 405808
15  python                              0x00000001058bd92e _PyMethodDef_RawFastCallKeywords + 350
16  python                              0x00000001059fdb47 call_function + 247
17  python                              0x00000001059fb684 _PyEval_EvalFrameDefault + 45284
18  python                              0x00000001058bd078 function_code_fastcall + 120
19  python                              0x00000001059fdafe call_function + 174
20  python                              0x00000001059fb684 _PyEval_EvalFrameDefault + 45284
21  python                              0x00000001059ef2d2 _PyEval_EvalCodeWithName + 418
22  python                              0x00000001058bc577 _PyFunction_FastCallDict + 231
23  python                              0x00000001059400b1 slot_tp_init + 193
24  python                              0x000000010594a091 type_call + 241
25  python                              0x00000001058bd283 _PyObject_FastCallKeywords + 179
26  python                              0x00000001059fdbe4 call_function + 404
27  python                              0x00000001059fb778 _PyEval_EvalFrameDefault + 45528
28  python                              0x00000001058bd078 function_code_fastcall + 120
29  python                              0x00000001059e724e map_next + 126
30  python                              0x00000001058e6604 list_extend + 1156
31  python                              0x00000001058e606a list___init__ + 138
32  python                              0x000000010594a091 type_call + 241
33  python                              0x00000001058bd283 _PyObject_FastCallKeywords + 179
34  python                              0x00000001059fdbe4 call_function + 404
35  python                              0x00000001059fb6bf _PyEval_EvalFrameDefault + 45343
36  python                              0x00000001058bd078 function_code_fastcall + 120
37  python                              0x00000001059fb8cf _PyEval_EvalFrameDefault + 45871
38  python                              0x00000001059ef2d2 _PyEval_EvalCodeWithName + 418
39  python                              0x00000001058bc577 _PyFunction_FastCallDict + 231
40  python                              0x00000001059fb8cf _PyEval_EvalFrameDefault + 45871
41  python                              0x00000001058bd078 function_code_fastcall + 120
42  python                              0x00000001059fdafe call_function + 174
43  python                              0x00000001059fb5ee _PyEval_EvalFrameDefault + 45134
44  python                              0x00000001058bd078 function_code_fastcall + 120
45  python                              0x00000001059fdafe call_function + 174
46  python                              0x00000001059fb5ee _PyEval_EvalFrameDefault + 45134
47  python                              0x00000001058bd078 function_code_fastcall + 120
48  python                              0x00000001058c04a2 method_call + 130
49  python                              0x00000001058bdef2 PyObject_Call + 130
50  python                              0x0000000105adf11b t_bootstrap + 123
51  libsystem_pthread.dylib             0x00007fff64dc8305 _pthread_body + 126
52  libsystem_pthread.dylib             0x00007fff64dcb26f _pthread_start + 70
53  libsystem_pthread.dylib             0x00007fff64dc7415 thread_start + 13
[CALL STACK END]

Looks like a failure due to file open, but have double checked with all the files, all of them are in correct format.

To Reproduce Steps to reproduce the behavior:

  1. Create a thread pool of 10 threads using multiprocessing.dummy
  2. Each thread take one audio file
  3. For each file, create a SpeechRecognizer, then call speech_recognize_continuous_from_file(function in samples)

Expected behavior I expected the script running until all 15000 tests finished.

Version of the Cognitive Services Speech SDK I believe it’s the most updated version.

Platform, Operating System, and Programming Language Screen Shot 2019-11-19 at 2 14 33 PM

  • OS: MacOS Mojave
  • Programming language: Python

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:29 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Lay3r8commented, Oct 9, 2020

Ok it works if the file is in the same directory. Still it’s a weird behavior that the library doesn’t works with files from other locations than the script’s directory.

1reaction
kubazjawincommented, Oct 9, 2020

I have a file in the same directory as the script.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to resolve question with error_code 0x8 ...
... i got a exception while run this code:[Exception with an error code: 0x8 (SPXERR_FILE_OPEN_FAILED)] how could i resolve this exception ...
Read more >
Azure Speech SDK Intent recognition Error on Ubuntu ...
1 Answer. This issue was solved here. The problem was that I didn't supply an absolute path for the keyword table file.
Read more >
What is failed error code 0x8? - Old School Gamers
Error 0x8 means "Not enough memory resources are available to process this command." vague as well.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found