spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
1.04k stars 149 forks source link

MacOS BigSur: ||PaMacCore (AUHAL)|| Error on line 1316: err='-66748', msg=Unknown Error #299

Open sharonlev opened 3 years ago

sharonlev commented 3 years ago

When attempting to run sample code from (https://python-sounddevice.readthedocs.io/en/0.3.7/_downloads/play_file.py) on a macOS Big Sur (clean venv based on py3.7), I am getting the following:

||PaMacCore (AUHAL)|| Error on line 1316: err='-66748', msg=Unknown Error PortAudioError: Error opening OutputStream: Internal PortAudio error [PaErrorCode -9986]

any idea what needs to be re-build to support the new OS?

mgeier commented 3 years ago

Sorry, I have no idea what causes this error and how it could be fixed, but for the record, the same problem seems to appear when using PyAudio (which uses the same underlying library PortAudio), see https://stackoverflow.com/questions/65432130/pyaudio-oserror-errno-9986-internal-portaudio-error.

You should probably report this issue to the PortAudio project, see http://portaudio.com/contacts.html.

mgeier commented 3 years ago

Maybe related:

zappos23 commented 3 years ago

Hi, I tried to reinstall and it's working now. brew uninstall portaudio brew install portaudio --HEAD

sharonlev commented 3 years ago

Thanks for the HEADs up ;)

brew install portaudio --HEAD

Looks like that did the trick here (regular install did not resolve yet)

mgeier commented 3 years ago

See also https://github.com/PortAudio/portaudio/issues/468 and https://github.com/PortAudio/portaudio/pull/470.

This hopefully goes away once the new version of the .dylib is used, see also #333.

mgeier commented 3 years ago

I've just created a new .dylib in case somebody wants to test it: https://github.com/spatialaudio/portaudio-binaries/pull/8.

mgeier commented 3 years ago

If anyone still has this problem (especially on an M1 Mac), can you please try the .dylib from https://github.com/spatialaudio/portaudio-binaries/pull/10 and report if it works?

vrslev commented 2 years ago

@mgeier I have M1 Mac and everything works fine without your custom built. I use PortAudio from brew (ARM version).

onehundredfeet commented 1 year ago

I am getting this on my Mac M1:

||PaMacCore (AUHAL)|| AUHAL component not found.

I have used home-brew to reinstall, but am not using head ATM

stefansjs commented 1 year ago

Can someone help me with this? I'm installing portaudio with conda. I don't really know how packages are published in brew or conda. Is there a nightly conda package that I could try to use, similar to that --HEAD command for brew?

mgeier commented 1 year ago

@stefansjs and @onehundredfeet

You can try to uninstall portaudio with conda and brew and then install sounddevice with pip.

I'm currently updating the installation docs here: #495.

Is there a nightly conda package

No.

If you really want to try the latest development version (which I think you don't need to solve the problem at hand), you can install it with pip as well: https://python-sounddevice.readthedocs.io/en/0.4.6/CONTRIBUTING.html#development-installation

However, the PortAudio packages from conda and brew will interfere with that just a badly.