alexa-pi / AlexaPiDEPRECATED

DEPRECATED - Use https://github.com/alexa-pi/AlexaPi instead ...Turn a Raspberry Pi into an Alexa Client
https://github.com/alexa-pi/AlexaPi
MIT License
587 stars 442 forks source link

alsaaudio.ALSAAudioError: Device or resource busy [plughw:CARD=Device,DEV=0] #142

Closed souto93 closed 7 years ago

souto93 commented 7 years ago

Hello everyone. I've been stuck with this for days... I'd appreciate any help , this is very frustating.

pi@raspberrypi:~/Downloads/AlexaPi $ sudo python main.py Checking Internet Connection... Connection OK Traceback (most recent call last): File "main.py", line 497, in start() File "main.py", line 397, in start inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NORMAL, device) alsaaudio.ALSAAudioError: Device or resource busy [plughw:CARD=Device,DEV=0]

This is what i get from arecord -L

null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server sysdefault:CARD=Device USB PnP Sound Device, USB Audio Default Audio Device front:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio Front speakers surround21:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 4.0 Surround output to Front and Rear speakers surround41:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio IEC958 (S/PDIF) Digital Audio Output dmix:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio Direct sample mixing device dsnoop:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio Direct sample snooping device hw:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio Direct hardware device without any conversions plughw:CARD=Device,DEV=0 USB PnP Sound Device, USB Audio Hardware device with all software conversions

And this is what i get from arecord -l

\ List of CAPTURE Hardware Devices ** card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0

souto93 commented 7 years ago

I'm connecting via USB a headhphones with microphone, in the same USB. The model is : Trust GTX 340

Ierlandfan commented 7 years ago

Edit: Sorry, wrong topic bookmarked

jtotham commented 7 years ago

I had this problem until I turned off the graphical desktop, with my Pi configured to boot just to the console (sudo raspi-config). Might not be practical for all but if you're building a headless voice activated system then having the GUI loaded is just a waste of resources.

renekliment commented 7 years ago

This project is now deprecated in favor of the new AlexaPi (https://github.com/alexa-pi/AlexaPi) which has all the features of this project and much more, such as:

Please switch over to the new project and if your issue persists there, file an issue in the new repo's issue tracker. Thank you.