sox: not found SoX could not be found!
use:
pip install sox
result: /bin/sh: 1: sox: not found SoX could not be found!
If you do not have SoX, proceed here:
- - - http://sox.sourceforge.net/ - - -
If you do (or think that you should) have SoX, double-check your
path variables.
sox requires that the actual sox library is installed in order to access the files, see https://pysox.readthedocs.io/en/latest/#installation for more details.
Thank you! I have installed this library.The problem has been solved. But,I use the code example:
import opensmile
smile = opensmile.Smile(
feature_set=opensmile.FeatureSet.ComParE_2016,
feature_level=opensmile.FeatureLevel.Functionals,
)
y = smile.process_file('audio.wav')
result:
Traceback (most recent call last):
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/pandas/core/tools/timedeltas.py", line 123, in _validate_timedelta_unit
return _unit_map[arg]
KeyError: 'sec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/IMCOCAP/project/extract_fea.py", line 7, in <module>
y = smile.process_file('/home/IMCOCAP/project/IEMOCAP_full_release/Session2/dialog/wav/Ses02F_impro01.wav')
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/opensmile/core/audinterface.py", line 349, in process_file
file, start=start, end=end, channel=channel,
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/opensmile/core/audinterface.py", line 103, in process_file
file, start=start, end=end, channel=channel,
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/opensmile/core/audinterface.py", line 70, in _process_file
file=file,
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/opensmile/core/audinterface.py", line 188, in _process_signal
signal.shape[-1] / sampling_rate, unit='sec'
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/pandas/core/tools/timedeltas.py", line 65, in to_timedelta
unit = _validate_timedelta_unit(unit)
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/pandas/core/tools/timedeltas.py", line 127, in _validate_timedelta_unit
raise ValueError("invalid timedelta unit {0} provided".format(arg))
ValueError: invalid timedelta unit sec provided
Process finished with exit code 1
soxrequires that the actual sox library is installed in order to access the files, see https://pysox.readthedocs.io/en/latest/#installation for more details.
@fmnbijbzq you have two options to solve the new problem:
- update pandas:
pip install --upgrade pandas - ~~update audinterface:
pip install --upgrade audinterface~~
@fmnbijbzq you have two options to solve the new problem:
- update pandas:
pip install --upgrade pandas- update audinterface:
pip install --upgrade audinterface
I think we are not using audinterface here yet. Only the first solution will work at the moment.
I think we are not using
audinterfacehere yet. Only the first solution will work at the moment.
oh you are right, we actually didn't switch yet. I created https://github.com/audeering/opensmile-python/issues/34.
Thank you! I made it.
@fmnbijbzq you have two options to solve the new problem:
- update pandas:
pip install --upgrade pandas- ~update audinterface:
pip install --upgrade audinterface~
@fmnbijbzq you have two options to solve the new problem:
- update pandas:
pip install --upgrade pandas- update audinterface:
pip install --upgrade audinterfaceI think we are not using
audinterfacehere yet. Only the first solution will work at the moment.
Which OS you are studying for Sox? @frankenjoe If Windows, how you fixed it by installing source for Sox and import from Python?
The Python package sox is no longer a dependency of opensmile. If you are using WAV, FLAC, or OGG files there should be no reason to install sox. To support other formats you might need sox or ffmpeg. Under Windows you need to install those libraries yourself and make sure they are added to the PATH variable.
I don't have experience with actual Windows PCs, but here is an example how we installed sox on a Windows runner on Github using micromamba
https://github.com/audeering/audiofile/blob/40a07e3e45fa27d2fe2bbb67b1acdd5c446dd1ec/.github/workflows/test.yml#L40-L42
and choco to install ffmpeg:
https://github.com/audeering/audiofile/blob/40a07e3e45fa27d2fe2bbb67b1acdd5c446dd1ec/.github/workflows/test.yml#L62-L64