WDM-KS is broken on Windows 10 via VMware
I tried pip install sounddevice then importing it, on 64 bit windows with 64 bit python - and it wasn't happy..
C:\Users\stu\Desktop\planar>python
Python 2.7.10rc1 (default, May 10 2015, 18:50:04) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sounddevice
Assertion failed!
Program: C:\Python27\python.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1035
Expression: FALSE
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Here's a bug about a portaudio crash on windows 10 - no idea if it's this crash at this crash obviously .. http://portaudio.music.columbia.narkive.com/Sqz6tW6b/internal-portaudio-error-in-windows-10
Thanks for the info. There seem to be several slightly different issues with Windows 10 (and some specific drivers), I think the one where they talk about an error at initialization might be the same we have here. I didn't see a solution there, though.
I'm cross-compiling the DLLs with MXE which have their own settings for PortAudio: https://github.com/mxe/mxe/blob/master/src/portaudio.mk.
The problem is that there was no new official release since the one MXE is already using (see http://www.portaudio.com/download.html). The only newer "release" in http://www.portaudio.com/archives/ is pa_snapshot.tgz.
Just for testing purposes, I compiled DLLs for this latest snapshot in the "portaudio-snapshot" branch: https://github.com/spatialaudio/portaudio-binaries/commit/51c4331ea07f956d7086edd238f89d50e3f08543
If you want, you can try these on your setup.
But even if this works, I don't think it's a good idea to release DLLs that don't have any version information on them. Sadly, the PortAudio people make releases very scarcely.
I tried the 64 bit one and it still crashes (which is reassuring in a way).
I downloaded MXE, and also made a git copy of the port audio svn. I guess if I can build an earlier version and not crash it should be possible to bisect +find the commit that caused it.
Ah, I didn't know that r1891 was older than 20140130 ...
Yes, you might be lucky and find a change in PortAudio that caused the error, but it might as well be a bug/incompatibility in the Windows stuff implemented in MinGW64. I have the feeling that the latter is more likely ...
Either way, good luck!
Have to see how far motivation carries me - adfernandes has a commit in his repo of 27 may 2013.
You're right it probably won't work - but I'll give it a go... not going to build anything in windows itself because of vm issues.
There's a related discussion on the PortAudio mailing list: https://lists.columbia.edu/pipermail/portaudio/2016-February/000316.html
I've just made a new release using the new PortAudio version. Can you please try if it works now?
I gave it a go in python2.7 and python3.5, and both get basically the same error, the line number is now
2.7 output (3.5 is the same)
>>> import sounddevice
Assertion failed!
Program: C:\Python27\python.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1061
Expression: FALSE
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
@stuaxo Thanks for the update!
I still don't know what's going wrong here, but since not so long ago, there is a new version of the PortAudio DLLs available from Christoph Gohlke: http://www.lfd.uci.edu/~gohlke/pythonlibs/#sounddevice
Those would probably be worth a try!
They was also a new portaudio snapshot last night.
bump, just importing sounddevice gave me that error, python 3.5 anaconda windows 10
@badjano
Are you also using VMware?
Did you try the Gohlke wheels?
@badjano Do other applications that use PortAudio work correctly? E.g. Audacity? Do they have support for WDM/KS?
No VMWare, using pycharm community on windows 10 natively ( installed python 3.5 via anaconda )
@badjano OK, thanks, I didn't know that this problem also occurs without VMware.
Can you please answer my other questions from above?
I would really like this to work on Windows too, even though I myself don't use it.
I don't know what Gohlke wheels is, and I now realize I didn't check to see if I installed PortAudio... sorry, I'll check it out when I get home and come back to you
I don't know what Gohlke wheels is
https://github.com/spatialaudio/python-sounddevice/issues/7#issuecomment-268458203
Don't know if this is the right place to put it. But I am running Python 3.7 on Windows 10 and can use pip to install sounddevice, but importing yields the same error:
Assertion failed!
Program: E:\Program Files\Python37\python.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1061
Expression: FALSE
Edit: After uninstalling the module and reinstalling, I no longer have this error
For people getting the same error in Windows10:
Assertion failed!
Program: E:\Program Files\Python37\python.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1061
Expression: FALSE
Steps:
- Locate
libportaudio64bit.dllfile (located in Python folder >\Lib\site-packages\_sounddevice_data\portaudio-binaries) - Rename
libportaudio64bit.dllfile to_libportaudio64bit.dll- instead of replacing/deleting - Copy
portaudio_x64.dllfromportaudio-r1891-build\lib\x64\ReleaseMinDependencydirectory after extracting from this one, to the above directory in Python folder. - Rename
portaudio_x64.dlltolibportaudio64bit.dll
@Maneesh3 Please note that the link you are recommending points to an older PortAudio version.
It would probably better to recommend Christoph Gohlke's DLLs instead: http://www.lfd.uci.edu/~gohlke/pythonlibs/#sounddevice
Those are also easier to install by simply using pip. The previous installation can be uninstalled with pip uninstall sounddevice.