Anaconda: PyAudio install interferes with ASIO recognition
See original GitHub issueI just wasted a couple of days looking into this issue. It seems that the Pyaudio/Portaudio install interferes with the python-sounddevice query_devices() function for ASIO devices. No matter what I did I could not see my ASIO drivers when performing the python-sounddevice query_device(). Even after I installed python-sounddevice with PIP and verified that it was returning the ASIO enable Portaudio version libportaudio64bit.dll with the get_portaudio_version() function. It wasn’t until I removed Pyaudio/Portaudio from my Anaconda install that I could see my ASIO devices.
Q1: Do I have a need for pyaudio if I have python-sounddevice? Q2: Is there a way to make these work together?
Here is my python-sounddevice Python program: Sounddevice_DeviceQuery.py
import sounddevice as sd
print(sd.query_devices())
print(sd.get_portaudio_version())
print(sd.query_hostapis())
from ctypes.util import find_library
print(find_library('portaudio'))
print(find_library('libportaudio64bit'))
Example output BEFORE Removal of Pyaudio/Portaudio
(base) Z:\Projects\Python>C:/Users/****/AppData/Local/Continuum/anaconda3/python.exe Z:/Projects/Python/Sounddevice_DeviceQuery.py
0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)
> 1 Focusrite USB (Focusrite USB Au, MME (8 in, 0 out)
2 Microphone (HD Webcam C310), MME (1 in, 0 out)
3 Microsoft Sound Mapper - Output, MME (0 in, 2 out)
< 4 Focusrite USB (Focusrite USB Au, MME (0 in, 8 out)
5 FrontMic (Realtek HD Audio Front Mic input), Windows WDM-KS (2 in, 0 out)
6 Stereo Mix (Realtek HD Audio Stereo input), Windows WDM-KS (2 in, 0 out)
7 Speakers (Realtek HD Audio output), Windows WDM-KS (0 in, 2 out)
8 Output (), Windows WDM-KS (0 in, 2 out)
9 Output (), Windows WDM-KS (0 in, 2 out)
10 Microphone (HD Webcam C310), Windows WDM-KS (1 in, 0 out)
11 Focusrite USB (fniusbwave_48), Windows WDM-KS (8 in, 0 out)
12 Analog Out (fniusbwave_48), Windows WDM-KS (0 in, 8 out)
(1246720, 'PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4')
({'name': 'MME', 'devices': [0, 1, 2, 3, 4], 'default_input_device': 1, 'default_output_device': 4}, {'name': 'Windows WDM-KS', 'devices': [5, 6, 7, 8, 9, 10, 11, 12], 'default_input_device': 11, 'default_output_device': 12})
Z:\Users\****\AppData\Local\Continuum\anaconda3\Library\bin\portaudio.dll
None
Example output AFTER Removal of Pyaudio/Portaudio
(base) H:\Projects\Python>Z:/Users/****/AppData/Local/Continuum/anaconda3/python.exe Z:/Projects/Python/Sounddevice_DeviceQuery.py
0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)
> 1 Focusrite USB (Focusrite USB Au, MME (2 in, 0 out)
2 Microphone (HD Webcam C310), MME (2 in, 0 out)
3 Microsoft Sound Mapper - Output, MME (0 in, 2 out)
< 4 Focusrite USB (Focusrite USB Au, MME (0 in, 2 out)
5 Primary Sound Capture Driver, Windows DirectSound (2 in, 0 out)
6 Focusrite USB (Focusrite USB Audio), Windows DirectSound (2 in, 0 out)
7 Microphone (HD Webcam C310), Windows DirectSound (2 in, 0 out)
8 Primary Sound Driver, Windows DirectSound (0 in, 2 out)
9 Focusrite USB (Focusrite USB Audio), Windows DirectSound (0 in, 2 out)
10 ASIO4ALL v2, ASIO (2 in, 2 out)
11 Focusrite USB ASIO, ASIO (6 in, 4 out)
12 Focusrite USB (Focusrite USB Audio), Windows WASAPI (0 in, 2 out)
13 Focusrite USB (Focusrite USB Audio), Windows WASAPI (2 in, 0 out)
14 Microphone (HD Webcam C310), Windows WASAPI (1 in, 0 out)
15 FrontMic (Realtek HD Audio Front Mic input), Windows WDM-KS (2 in, 0 out)
16 Stereo Mix (Realtek HD Audio Stereo input), Windows WDM-KS (2 in, 0 out)
17 Speakers (Realtek HD Audio output), Windows WDM-KS (0 in, 2 out)
18 Output (), Windows WDM-KS (0 in, 2 out)
19 Output (), Windows WDM-KS (0 in, 2 out)
20 Microphone (HD Webcam C310), Windows WDM-KS (1 in, 0 out)
21 Focusrite USB (fniusbwave_48), Windows WDM-KS (8 in, 0 out)
22 Analog Out (fniusbwave_48), Windows WDM-KS (0 in, 8 out)
(1246720, 'PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4')
({'name': 'MME', 'devices': [0, 1, 2, 3, 4], 'default_input_device': 1, 'default_output_device': 4}, {'name': 'Windows DirectSound', 'devices': [5, 6, 7, 8, 9], 'default_input_device': 5, 'default_output_device': 8}, {'name': 'ASIO', 'devices': [10, 11], 'default_input_device': 10, 'default_output_device': 10}, {'name': 'Windows WASAPI', 'devices': [12, 13, 14], 'default_input_device': 13, 'default_output_device': 12}, {'name': 'Windows WDM-KS', 'devices': [15, 16, 17, 18, 19, 20, 21, 22], 'default_input_device': 21, 'default_output_device': 22})
None
None
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Thanks @neilser, that’s good to know.
The path containing
_sounddevice_data
shows that the pre-packaged library from _sounddevice_data is used.When installing the library with
conda
, the path would be different.I just ran into this issue. Is there a reason why the package available on pypi is able to include portaudio compiled with ASIO support built-in, but the conda version cannot? Does this have to do with the fact that the conda-forge feedstock recipe would need to include the SDK as part of the repo to enable the automated builds?