Closed ShinoharaYuuyoru closed 2 years ago
New information 1:
I restarted my system and ran this script at first. Yes, it finished with the proper output. However, the second time I ran, it stuck again and cannot run again.
The behavior is like that some important resources that sounddevice
didn't release immediately when the main thread terminated.
New information 2:
For testing, I used PyAudio
to test the device is useable or not.
As my thought, p = pyaudio.PyAudio()
also didn't work and got stuck.
I found that sounddevice
and PyAudio
seems both use portaudio
binary, and maybe the problem happened in portaudio
(with Windows 7) ...?
New information 3:
Today, I used another computer which is Windows 10 with Python 3.9.7. The code runs PERFECT.
So, there may be several directions to solve this issue:
portaudio
and Windows 7.And, by my intuition, I don't think there is a compatibility problem of portaudio
with Python 3.8.x and Python 3.9.x, although I have no experiment evidence... Sorry for this.
I'm using Python 3.8.10 in Windows 7, installed
sounddevice
in my venv withpip install sounddevice
got the latest version 0.4.2.I started a
test.py
script. The code is as below:import sounddevice
print("Hello, world!")
Then I run this script with
python test.py
in cmd.exe but nothing happened, and it seems that the program stuck like this:Because no error information I can catch, so I don't know how to deal with this situation...
Thank you for your attention and I'm waiting for your kind guidance and solutions.