Comments (9)
from python-sounddevice.
yes. wdm-ks isn't available then: default_output_device: -1,
default_input_device: -1
but I also get some problems with utf8, when querying for devices or trying
to use wasapi:
C:\snd_scripts_f>python -m sounddevice
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\sounddevice.py", line 2517, in
print(query_devices())
File "C:\Python27\lib\site-packages\sounddevice.py", line 613, in
query_device
s
for i in range(_check(_lib.Pa_GetDeviceCount())))
File "C:\Python27\lib\site-packages\sounddevice.py", line 613, in
for i in range(_check(_lib.Pa_GetDeviceCount())))
File "C:\Python27\lib\site-packages\sounddevice.py", line 622, in
query_device
s
_lib.Pa_HostApiTypeIdToHostApiIndex(_lib.paMME)) else 'utf-8'),
File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 48:
invalid
continuation byte
2016-08-16 19:42 GMT+02:00 Matthias Geier [email protected]:
Did you try to use the bundled DLL?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANHZpvx7T3-NVpcQEXlm-f9kca4y5c51ks5qgfZugaJpZM4Jk5lS
.
from python-sounddevice.
just to let you know; wdm ks works perfect on windows 7; sound latency (measured with an oscilloscope) is between 0.5 and 2 ms; that's very good, thanks a lot!
from python-sounddevice.
I think the issue can be closed; I can't reproduce the problem on win8 anymore. wdm-ks worked today, when I specified the location of the audioport.dll with
_lib = _ffi.dlopen('c:\python27\Lib\site-packages\_sounddevice_data\libportaudio32bit.dll'
Maybe the portaudio.dll of pyo was loaded, without my knowing
from python-sounddevice.
OK, that's possible. If dlopen('portaudio')
succeeds, the bundled DLL is not used.
I guess this is a feature?
This is necessary for Linux, I don't know if I can/should disable this for Windows ...?
You can try to check if the PortAudio versions are different:
import sounddevice as sd
sd.get_portaudio_version()
You might get some information about the used library with this:
from ctypes.util import find_library
find_library('portaudio')
Just out of curiosity, where is pyo's DLL installed?
from python-sounddevice.
thanks for the infos. It's actually a nice thing, that one can choose the
portaudio.dll. But it can mislead...
pyo's dll is installed in the main site-package folder:
pythonpath/Lib/site-packages/portaudio.dll
2016-08-25 14:25 GMT+02:00 Matthias Geier [email protected]:
OK, that's possible. If dlopen('portaudio') succeeds, the bundled DLL is
not used.I guess this is a feature?
This is necessary for Linux, I don't know if I can/should disable this for
Windows ...?You can try to check if the PortAudio versions are different:
import sounddevice as sd
sd.get_portaudio_version()You might get some information about the used library with this:
from ctypes.util import find_library
find_library('portaudio')Just out of curiosity, where is pyo's DLL installed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANHZpllz87Alla-UT6TrV8fSwhjxge4Aks5qjYnOgaJpZM4Jk5lS
.
from python-sounddevice.
that's ok now.
now,
I get however an error, if I call
sd.play(data, device=9, extra_settings=wasapi_exclusive)
c:\python27\lib\site-packages\sounddevice-0.3.4-py2.7.egg\sounddevice.py in __init__(self, kind, samplerate, blocksize, device, channels, dtype, latency, extra_
settings, callback_wrapper, finished_callback, clip_off, dither_off, never_drop_
input, prime_output_buffers_using_stream_callback)
908 samplerate, blocksize, stream_flags,
909 self._callback, _ffi.NULL),
--> 910 'Error opening {0}'.format(self.__class__.__name__))
911
912 # dereference PaStream** --> PaStream*
c:\python27\lib\site-packages\sounddevice-0.3.4-py2.7.egg\sounddevice.py in _check(err, msg)
2601 else:
2602 msg += _ffi.string(_lib.Pa_GetErrorText(err)).decode()
-> 2603 raise PortAudioError(msg)
2604 return err
2605
PortAudioError: Error opening OutputStream: Incompatible host API specific stream info
sd.query_devices()
shows:
9 Speakers (Realtek High Definition Audio), Windows WASAPI (0 in, 2 out)
there seems to be another small issue with sd.default.extra_settings = wasapi_exclusive
;
I get the following error message, if I run it:
c:\python27\lib\site-packages\sounddevice-0.3.4-py2.7.egg\sounddevice.py in __iit__(self, kind, samplerate, blocksize, device, channels, dtype, latency, extra
settings, callback_wrapper, finished_callback, clip_off, dither_off, never_drop
input, prime_output_buffers_using_stream_callback)
887 parameters, self._dtype, self._samplesize, samplerate = \
888 _get_stream_parameters(kind, device, channels, dtype, l
tency,
--> 889 extra_settings, samplerate)
890 self._device = parameters.device
891 self._channels = parameters.channelCount
c:\python27\lib\site-packages\sounddevice-0.3.4-py2.7.egg\sounddevice.py in _get_stream_parameters(kind, device, channels, dtype, latency, extra_settings, samplerate)
2523 latency = default.latency[kind]
2524 if extra_settings is None:
-> 2525 extra_settings = default.extra_settings[kind]
2526 if samplerate is None:
2527 samplerate = default.samplerate
TypeError: 'WasapiSettings' object has no attribute '__getitem__'
from python-sounddevice.
Thanks for testing! Just for the record, this should have been an answer to #35 (comment).
I fixed the second problem in a new commit to #39, can you please try again?
I don't know what's causing the first error, probably it's related to the second one ...?
from python-sounddevice.
I'm closing this issue since it was caused by pyo's portaudio.dll
.
from python-sounddevice.
Related Issues (20)
- Enhancement Request: Integrate Playback Status Check into Simple `play`/`stop` API in `sounddevice` HOT 4
- Feature request for loopback of output device. HOT 3
- 设备解码错误?utf-8' codec can't decode byte 0xc2 in position 6: invalid continuation byte HOT 4
- Sounddevice + big dict + OOP = Segfault / Bus Error HOT 11
- Update device list by reloading portaudio dll HOT 1
- Won't be able to import sounddevice due to unknown issue with `libportaudio64bit.dll` HOT 5
- Error opening OutputStream: Unanticipated host error', -9999, (2, 0, 'Failed to load ASIO driver
- Use sounddevice with virtual audio device and minimize latency HOT 1
- Achieving stable latency between calls of "playrec" HOT 8
- sounddevice not recognize all devices?
- Issues with playing concurrently with Youtube HOT 1
- Latency 30mSec HOT 9
- Advice on asynchronous playback HOT 7
- docker node minimal image
- Can I continue recording until the volume drops below a threshold? HOT 4
- Simultaneous audio playback datatype issue HOT 2
- Does sd.wait() block all other threads? HOT 1
- OSERROR portaudio library not found
- Advice on detecting when Sounddevice has stopped playing audio (and using multiple OutputStreams)
- Inconsistent order of channels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-sounddevice.