Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BSung8
Novice
450 Views

demo_speech_recognition.bat => live speech recognition demo fail

OS: win10

OpenVINO version : 2020.4.287

run demo: 

C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\demo_speech_recognition.bat

fail message:

File "C:\Program Files\Python36\lib\site-packages\soundcard\mediafoundation.py", line 372, in <genexpr>
devicename = ''.join(chr(c) for c in data[0:idx])
ValueError: chr() arg not in range(0x110000)

OnInit returned false, exiting.

0 Kudos
8 Replies
IntelSupport
Community Manager
440 Views

Hi Bryan Sung,


Thank you for contacting Intel. We are currently investigating this issue, and will get back to you soon.


Regards,

Adli.


IntelSupport
Community Manager
432 Views

Hi Bryan,


Thank you for waiting.

We would like to check the following with you:

1) Do you have audio devices installed? Are they correctly recognizable in the Device Manager? Are the drivers up to date? If yes, then:

2) Are you able to execute 'demo_squeezenet_download_convert_run.bat' in command prompt? The demo is in the same folder with ‘demo_speech_recognition.bat'. If yes, then:

3) We would like the know the CPU device used to run this demo, and the full error output in snapshot/text file if possible.


Regards,

Adli


BSung8
Novice
425 Views

Hi Adli,

Thank you for your reply.

My test platform:

1. BOXNUC7i7BNH

2. Dell Latitude 7390 notebook

Microphone working fine in another application.

both of them have the same error in live speech demo.

============================================

demo_squeezenet_download_convert_run.bat is working fine.

classification_sample_async.exe -i "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png" -m "C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml" -d CPU
[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. 2020.4.0-359-21e092122f4-releases/2020/4
Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png
[ INFO ] Creating Inference Engine
CPU
MKLDNNPlugin version ......... 2.1
Build ........... 2020.4.0-359-21e092122f4-releases/2020/4

[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Loading model to the device
[ INFO ] Create infer request
[ INFO ] Start inference (10 asynchronous executions)
[ INFO ] Completed 1 async request execution
[ INFO ] Completed 2 async request execution
[ INFO ] Completed 3 async request execution
[ INFO ] Completed 4 async request execution
[ INFO ] Completed 5 async request execution
[ INFO ] Completed 6 async request execution
[ INFO ] Completed 7 async request execution
[ INFO ] Completed 8 async request execution
[ INFO ] Completed 9 async request execution
[ INFO ] Completed 10 async request execution
[ INFO ] Processing output blobs

Top 10 results:

Image C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png

classid probability label
------- ----------- -----
817 0.6853030 sports car, sport car
479 0.1835197 car wheel
511 0.0917197 convertible
436 0.0200694 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
751 0.0069604 racer, race car, racing car
656 0.0044177 minivan
717 0.0024739 pickup, pickup truck
581 0.0017788 grille, radiator grille
468 0.0013083 cab, hack, taxi, taxicab
661 0.0007443 Model T

[ INFO ] Execution successful

[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool

###############|| Classification demo completed successfully ||###############

 

========================================================================

demo_speech_recognition.bat log as below,

=========================================================================

target_precision = FP32
Python 3.6.5
[setupvars.bat] OpenVINO environment initialized
INTEL_OPENVINO_DIR is set to C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287
Python 3.6.5
ECHO close

###############|| Generate VS solution for Inference Engine demos using cmake ||###############


press any key to contunue ...
Requirement already satisfied: pyyaml in c:\users\bryans\appdata\roaming\python\python36\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 1)) (5.1)
Requirement already satisfied: requests in c:\users\bryans\appdata\roaming\python\python36\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 2)) (2.22.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\bryans\appdata\roaming\python\python36\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 2)) (1.25.2)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\bryans\appdata\roaming\python\python36\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 2)) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\bryans\appdata\roaming\python\python36\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 2)) (2019.3.9)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\bryans\appdata\roaming\python\python36\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\tools\downloader\requirements.in (line 2)) (2.8)
copied 11 files
copied 1 file
python "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\tools\downloader\downloader.py" --all --output_dir "C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir" --cache_dir "C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\cache"
################|| Downloading models ||################

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\speech_recognition_config.template from the cache

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\lspeech_s5_ext.feature_transform from the cache

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\lspeech_s5_ext.xml from the cache

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\lspeech_s5_ext.bin from the cache

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\hclg.fst from the cache

========== Retrieving C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\labels.bin from the cache

################|| Post-processing ||################


###############|| Generate configuration file for models ||###############

Creating Visual Studio 15 2017 x64 files in C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition...
-- The C compiler identification is MSVC 19.16.27042.0
-- The CXX compiler identification is MSVC 19.16.27042.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
x64
C:/Program Files (x86)/IntelSWTools/openvino_2020.4.287/data_processing/audio/speech_recognition/lib/x64/feature_extraction_library.lib
lib/x64
-- Found InferenceEngine: C:/Program Files (x86)/IntelSWTools/openvino_2020.4.287/deployment_tools/inference_engine/lib/intel64/Release/inference_engine.lib (Required is at least version "2.0")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/bryans/Documents/Intel/OpenVINO/data_processing_demos_build/audio/speech_recognition

press any key to contunue ...

###############|| Build Inference Engine speech recognition demos using MS Visual Studio (MSBuild.exe) ||###############

press any key to contunue ...
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" SpeechRecognitionDemo_n_Tools.sln /p:Configuration=Release /clp:ErrorsOnly /m
Microsoft (R) Build Engine for .NET Framework 15.9.21+g9802d43bc3
Copyright (C) Microsoft Corporation.


press any key to contunue ...

###############|| Run Inference Engine offline speech recognition demo ||###############


press any key to contunue ... ...
"C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\intel64\Release\offline_speech_recognition_app.exe" -wave="C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\how_are_you_doing.wav" -c="C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\speech_lib.cfg"
[ INFO ] Using feature transformation C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\lspeech_s5_ext.feature_transform
[ INFO ] InferenceEngine API ver. 2.1 (build: 2020.4.0-359-21e092122f4-releases/2020/4)
[ INFO ] Device info:
[ INFO ] CPU: MKLDNNPlugin ver. 2.1
[ INFO ] Batch size: 8
[ INFO ] Model loading time: 45.20 ms
Recognition result:
HOW ARE YOU DOING


###############|| Demo completed successfully ||###############
###############|| Installing requirements for live speech recognition demo||###############
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy>=1.16.3 in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 1)) (1.19.2)
Requirement already satisfied: SoundCard>=0.3.3 in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (0.4.0)
Requirement already satisfied: wxPython in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (4.1.0)
Requirement already satisfied: cffi in c:\users\bryans\appdata\roaming\python\python36\site-packages (from SoundCard>=0.3.3->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (1.14.3)
Requirement already satisfied: pillow in c:\program files\python36\lib\site-packages (from wxPython->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (7.2.0)
Requirement already satisfied: six in c:\program files\python36\lib\site-packages (from wxPython->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (1.15.0)
Requirement already satisfied: pycparser in c:\users\bryans\appdata\roaming\python\python36\site-packages (from cffi->SoundCard>=0.3.3->-r C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (2.20)
copied 25 files
..\models\en-us file has already existed
copyied 1 file
C:\Program Files\Python36\lib\site-packages\wx\lib\pubsub\__init__.py:25: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
wx.wxPyDeprecationWarning)
Traceback (most recent call last):
File "speech_demo_app.py", line 41, in OnInit
MainController()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\gui\main_controller.py", line 79, in __init__
self._reload_device_list()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\gui\main_controller.py", line 152, in _reload_device_list
device_list, default_input_index, loopback_index = audio_helper.get_input_device_list()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\audio\audio_helper.py", line 40, in get_input_device_list
devices = [(mic, mic.name) for mic in soundcard.all_microphones(include_loopback=True)]
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\audio\audio_helper.py", line 40, in <listcomp>
devices = [(mic, mic.name) for mic in soundcard.all_microphones(include_loopback=True)]
File "C:\Program Files\Python36\lib\site-packages\soundcard\mediafoundation.py", line 372, in name
devicename = ''.join(chr(c) for c in data[0:idx])
File "C:\Program Files\Python36\lib\site-packages\soundcard\mediafoundation.py", line 372, in <genexpr>
devicename = ''.join(chr(c) for c in data[0:idx])
ValueError: chr() arg not in range(0x110000)
OnInit returned false, exiting...

BSung8
Novice
383 Views

Hi Adli,

I try the version 2021.1. It's still fail. Logo as below,

###############|| Run Inference Engine offline speech recognition demo ||###############


press key to continue ...
"C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\intel64\Release\offline_speech_recognition_app.exe" -wave="C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\how_are_you_doing.wav" -c="C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\speech_lib.cfg"
[ INFO ] Using feature transformation C:\Users\bryans\Documents\Intel\OpenVINO\openvino_models\ir\intel\lspeech_s5_ext\FP32\lspeech_s5_ext.feature_transform
[ INFO ] InferenceEngine API ver. 2.1 (build: 2021.1.0-1237-bece22ac675-releases/2021/1)
[ INFO ] Device info:
[ INFO ] CPU: MKLDNNPlugin ver. 2.1
[ INFO ] Batch size: 8
[ INFO ] Model loading time: 35.89 ms
Recognition result:
HOW ARE YOU DOING


###############|| Demo completed successfully ||###############
###############|| Installing requirements for live speech recognition demo||###############
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy>=1.16.3 in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 1)) (1.19.2)
Requirement already satisfied: SoundCard>=0.3.3 in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (0.4.0)
Requirement already satisfied: wxPython in c:\program files\python36\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (4.1.0)
Requirement already satisfied: cffi in c:\users\bryans\appdata\roaming\python\python36\site-packages (from SoundCard>=0.3.3->-r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (1.14.3)
Requirement already satisfied: six in c:\program files\python36\lib\site-packages (from wxPython->-r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (1.15.0)
Requirement already satisfied: pillow in c:\program files\python36\lib\site-packages (from wxPython->-r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 3)) (7.2.0)
Requirement already satisfied: pycparser in c:\users\bryans\appdata\roaming\python\python36\site-packages (from cffi->SoundCard>=0.3.3->-r C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\demo\\..\..\data_processing\audio\speech_recognition\demos\live_speech_recognition_demo\requirements_windows.txt (line 2)) (2.20)
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the 'C:\Program Files\Python36\python.exe -m pip install --upgrade pip' command.


C:\Program Files\Python36\lib\site-packages\wx\lib\pubsub\__init__.py:25: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
wx.wxPyDeprecationWarning)
Traceback (most recent call last):
File "speech_demo_app.py", line 41, in OnInit
MainController()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\gui\main_controller.py", line 79, in __init__
self._reload_device_list()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\gui\main_controller.py", line 152, in _reload_device_list
device_list, default_input_index, loopback_index = audio_helper.get_input_device_list()
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\audio\audio_helper.py", line 40, in get_input_device_list
devices = [(mic, mic.name) for mic in soundcard.all_microphones(include_loopback=True)]
File "C:\Users\bryans\Documents\Intel\OpenVINO\data_processing_demos_build\audio\speech_recognition\demos\live_speech_recognition_demo\audio\audio_helper.py", line 40, in <listcomp>
devices = [(mic, mic.name) for mic in soundcard.all_microphones(include_loopback=True)]
File "C:\Program Files\Python36\lib\site-packages\soundcard\mediafoundation.py", line 372, in name
devicename = ''.join(chr(c) for c in data[0:idx])
File "C:\Program Files\Python36\lib\site-packages\soundcard\mediafoundation.py", line 372, in <genexpr>
devicename = ''.join(chr(c) for c in data[0:idx])
ValueError: chr() arg not in range(0x110000)
OnInit returned false, exiting...

 

Sahira_Intel
Moderator
361 Views

Hi BSung8,

Thank you for the information. I am currently looking into this issue and will let you know when I have more information.

Best Regards,

Sahira

HarryZhong
Beginner
298 Views

Hi Sahira,

Any progress?I also encountered the same error on my Thinkpad T480s. 

Thanks

IntelSupport
Community Manager
248 Views

Hi Bryan,


We've replicated your issue, and the demo works for us either by recognizing our USB microphone or prompting "no audio device available" when the microphone is not plugged in.


We suspect the problem might be related to your microphone. Please run the demo without a microphone connected. In that case, you should see the same warning message (no audio device available). If it is a built-in microphone, you can disable it by going to Control Panel > Hardware and Sound > Sound > Recording > Microphone Array. Right-click it and choose 'Disable'.


Regards,

Adli


Adli
Moderator
212 Views

Hi Bryan,


This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Regards,

Adli


Reply