GETTING ERROR: Unable to open Slave. Why I don't know what to do here? I use UbuntuI tried this
sudo apt-get install alsa-utils
But I already have it but still nothing changed.I also did some other things for solving but didn't help and am also not understanding what's happening in this error... I am currently using ubuntu, I do remember doing the same code in windows it worked but this isn't i don't know what the difference is
error:
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slaveALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slaveALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rearALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfeALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.sideALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.sideALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dspALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dspALSA lib confmisc.c:160:(snd_config_get_card) Invalid field cardALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field cardALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
This was what I am trying: making AI but it is giving errorsI tried seeing in google and even asked AI's but result is same. Please someone help because I am trying to build Ai
def takeCommand(): r = sr.Recognizer() with sr.Microphone() as source: r.pause_threshold = 0.6 print("Listening... ") audio = r.listen(source) try: print("Recognizing...") query = r.recognize_google_cloud(audio,language="en-US") print(f"User said: {query}") return query