Closed nscotto closed 1 year ago
So it looks like you are using libportaudio.dylib
installed by conda
.
You could try uninstalling that and see what happens.
If then the one from brew
is used, you can try uninstalling that as well.
Then the one that's bundled with the sounddevice
module should be used.
BTW, did you try other examples? Does this error appear always or only in some situations? Did you try selecting other devices? How does your list of devices look like?
I tried selecting other devices but got the same results. Here's my list of devices currently, I also had a soundcard plugged previously:
❯ python play_file.py -l
0 MacBook Pro Microphone, Core Audio (1 in, 0 out)
1 MacBook Pro Speakers, Core Audio (0 in, 2 out)
> 2 WH-1000XM4, Core Audio (1 in, 0 out)
< 3 WH-1000XM4, Core Audio (0 in, 2 out)
4 Microsoft Teams Audio, Core Audio (2 in, 2 out)
Thanks for pointing at conda, I've tried:
❯ conda uninstall python-sounddevice
❯ pip install sounddevice
❯ python play_file.py MR1106_BlueLitMoon_Full/01_Kick.wav
# audio playing...
❯ pip uninstall sounddevice
❯ brew uninstall portaudio
❯ conda install -c conda-forge python-sounddevice
❯ python play_file.py MR1106_BlueLitMoon_Full/01_Kick.wav
||PaMacCore (AUHAL)|| AUHAL component not found.PortAudioError: Error opening OutputStream: Unanticipated host error [PaErrorCode -9999]: '' [<host API not found> error 0]
Good I can make it work with brew and pip :)
However it means that there is a problem with the portaudio shipped with conda on my system.
It's great that you found a way to make it work!
I would be curious though ... could you please check sd._libname
in the case where it works?
I'm not sure if you are now using PortAudio from brew
or the bundled one from the sounddevice
module.
It might also be interesting to do brew uninstall portaudio
and then pip install sounddevice
.
I am having this issue on a macOS 13.2.1 with M1 chip:
play_file.py:
also I have:
so issue