Home>

Error not finding Path.

In a Python module

from google_speech import Speech



This URL https://pypi.org/project/google-speech/
,
First install the above with pip, then SoX website Installed Sox.

But with Jupyter

from google_speech import Speech
-------------------------------------------- -------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-12-f69898ba90f1>in<module>
---->1 from google_speech import Speech
      2
      3 # say "Hello World"
      4 readtext = text
      5 lang = "zh"
c: \ users \ tsst1 \ appdata \ local \ programs \ python \ python36 \ lib \ site-packages \ google_speech \ __ init__.py in<module>
    321
    322 # check deps
->323 bin_dep.check_bin_dependency (("sox",))
    324
    325
c: \ users \ tsst1 \ appdata \ local \ programs \ python \ python36 \ lib \ site-packages \ google_speech \ bin_dep.py in check_bin_dependency (bins)
      5 for bin in bins:
      6 if shutil.which (bin) is None:
---->7 raise RuntimeError ("Binary '% s' could not be found"% (bin))
RuntimeError: Binary 'sox' could not be found


Will be returned.
However, if you enter Sox in CMD, the program starts, so Sox itself is installed safely.

This site https: //stackoverflow.com/questions/55899093/runtimeerror-binary-sox-could-not-be-found
,
I tried changing the path, but it doesn't work.
Sox.exe

C: \ Users \ tsst1 \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ sox-14.4.2


It is in.

I tried adding the above path to Control Panel->Preferences->Path, but it also gives an error.
Other Path
C: \ Users \ tsst1 \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \sox-14.4.2-win32.exe

C: \ Users \ tsst1 \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \sox-14-4-2

I changed it to

etc., but it doesn't work
Is there any solution?