Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soxbindings problem python3.7 #145

Closed
turpaultn opened this issue Feb 28, 2021 · 3 comments
Closed

Soxbindings problem python3.7 #145

turpaultn opened this issue Feb 28, 2021 · 3 comments

Comments

@turpaultn
Copy link

MacOS
conda environment in 3.7: pip install scaper

MWE

import scaper
sc = scaper.Scaper(1, "data/soundbank/audio/train/soundbank/foreground", "data/soundbank/audio/train/soundbank/background")
sc.add_background(("choose", []), ("choose", []), ("const", 0))
sc.generate()

Note: for this issue, I tried an environment in python 3.9 too just in case, the problem doesn't appear anymore.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/scaper/core.py", line 2274, in generate
    quick_pitch_time=quick_pitch_time)
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/scaper/core.py", line 1906, in _generate_audio
    sample_rate_in=event_sr
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/transform.py", line 62, in build_array
    extra_args=extra_args)
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/transform.py", line 55, in build
    output_audio, sample_rate_out = sox(args, input_array, sample_rate_in)
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/sox_cli.py", line 65, in sox
    available_fx = get_available_effects()
  File "/anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/effects.py", line 8, in get_available_effects
    from . import _soxbindings
ImportError: dlopen(/anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/_soxbindings.cpython-37m-darwin.so, 2): Symbol not found: ____chkstk_darwin
  Referenced from: /anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/.dylibs/libFLAC.8.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib
 in /anaconda3/envs/py37/lib/python3.7/site-packages/soxbindings/.dylibs/libFLAC.8.dylib
@turpaultn turpaultn changed the title Soxbindings mandatory Soxbindings problem in python3.7 Feb 28, 2021
@turpaultn turpaultn changed the title Soxbindings problem in python3.7 Soxbindings problem python3.7 Feb 28, 2021
@pseeth
Copy link
Collaborator

pseeth commented Feb 28, 2021

Seems like you might be missing a .flac decoder in your 3.7 environment? I just tried it in a fresh 3.7 conda environment, converted a file to FLAC and gave your script a shot with some modifications and it works okay for me. Though, soxbindings should be shipping with everything you need...but for now I can't reproduce. Perhaps try installing libflac?

@turpaultn
Copy link
Author

Indeed, my problem is solved, thank you !
What I had to do: install soxbindings from source, because it seems I have a version of OS X too old.

ImportError: dlopen(/anaconda3/envs/desed/lib/python3.6/site-packages/soxbindings/_soxbindings.cpython-36m-darwin.so, 2): Symbol not found: ____chkstk_darwin
  Referenced from: /anaconda3/envs/desed/lib/python3.6/site-packages/soxbindings/.dylibs/libFLAC.8.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib
 in /anaconda3/envs/desed/lib/python3.6/site-packages/soxbindings/.dylibs/libFLAC.8.dylib

@dilipupf
Copy link

what does installing soxbindings from source mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants