0

I am attempting to build a speech-to-text algorithm using Mozilla DeepSpeech, but I am having trouble installing the package.

First, I created a new virtual environment in Anaconda called deepspeech-venv and installed the latest version of the deepspeech package (v0.8.1) via pip in the Anaconda Powershell with the command pip install deepspeech --upgrade.

Next, I downloaded both the pbmm version and the tflite version of the pre-trained English models from Mozilla's GitHub using the commands wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.1/deepspeech-0.8.1-models.pbmm and wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.1/deepspeech-0.8.1-models.tflite.

Finally, I wanted to check and make sure that everything installed correctly, so I typed deepspeech -h into the command line, which produced the following error statement:

Traceback (most recent call last):
  File "c:\users\zachary.holden\anaconda3\envs\deepspeech_venv\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\zachary.holden\anaconda3\envs\deepspeech_venv\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\zachary.holden\Anaconda3\envs\deepspeech_venv\Scripts\deepspeech.exe\__main__.py", line 4, in <module>
  File "c:\users\zachary.holden\anaconda3\envs\deepspeech_venv\lib\site-packages\deepspeech\__init__.py", line 23, in <module>
    from deepspeech.impl import Version as version
  File "c:\users\zachary.holden\anaconda3\envs\deepspeech_venv\lib\site-packages\deepspeech\impl.py", line 13, in <module>
    from . import _impl
ImportError: DLL load failed: The specified module could not be found.

From what I understand, this means that I'm lacking some dependencies for the deepspeech library; however, I'm not quite sure what additional DLLs need to be installed or even how to go about that process. (Unless, of course, if the issue lies in my installation process, and I merely have to add another library.)

NOTE: I am running Python v3.7.7 on a Windows 10 64-bit system.

Zack
  • 77
  • 2
  • 6

1 Answers1

2

I copied the "libdeepspeech.so" file from "lib" directory to directly under "deepspeech" directory as suggested in the below shared link and it worked for me.

Reference Link

Dharman
  • 30,962
  • 25
  • 85
  • 135
Pranay
  • 432
  • 4
  • 14
  • I was able to solve the ImportError: DLL load failed while importing _impl: The specified module could not be found. issue by following the suggestion above i.e., by moving libdeepspeech.so from Lib/site-packages/deepspeech/lib/libdeepspeech.so to Lib/site-packages/deepspeech/libdeepspeech.so. – Puja Sharma May 29 '23 at 07:02