LAION-AI / natural_voice_assistant

MIT License
461 stars 43 forks source link

"import sounddevice as sd" halts python #11

Closed starman2k01 closed 8 months ago

starman2k01 commented 9 months ago

main.py gets stuck on Windows 11 "import sounddevice as sd" and simply halts. Win 11 Pro 22635.3140

braunale commented 9 months ago

Hey @starman2k01, is there any error message or something that could help to reproduce the error? How do you know that the main.py halts at exactly this import command?

starman2k01 commented 9 months ago

I executed each line in main.py within python. That line halts with no response.

braunale commented 9 months ago

Could you try import sounddevice just in the terminal or in a different python file, so we could check if its a problem with the sounddevice package itself or with the code in main.py? In main.py import sounddevice is executed in the play_audio function which runs in a separated sub process. Maybe it have something todo with this. So lets check first, if you can import sounddevice in a simple python script.

starman2k01 commented 9 months ago

So I execute these lines one at a time in a python environment. Each executes fine until import sounddevice: import gc import time import torch import pyaudio import multiprocessing import sounddevice as sd There is no response and python is locked up. I have to crash out. Executing "import sounddevice" outside of the bud-e environment in python results in:

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'sounddevice'

Which at least is a response.

braunale commented 9 months ago

Did you follow the steps in the installation guide provided in the readme? Are there any errors when you install the requirements? If you just retry installing sounddevice with 'pip install sounddevice' what response do you get?

braunale commented 9 months ago

@starman2k01 Are you still encounter the problem or did you found a solution in the meantime?

braunale commented 8 months ago

I will close this issue due to inactivity. If you still encounter this problem, please reopen the issue and provide additional information to reproduce the error.