ros-ai / ros2_whisper

Whisper C++ Inference Action Server for ROS 2
29 stars 9 forks source link

[audio_listener-1] ALSA lib error #16

Open codingBigBird opened 2 months ago

codingBigBird commented 2 months ago

After getting some updates, My whisper can't run and it gives some errors when running ros2 launch whisper_bringup bringup.launch.py. And there is no audio_listener node on ros2 node list and the server doesn't run. how to solve this issue?

[INFO] [launch]: Default logging verbosity is set to INFO [INFO] [audio_listener-1]: process started with pid [66674] [INFO] [component_container_mt-2]: process started with pid [66676] [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.hdmi.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.hdmi.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM hdmi [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.modem.0:CARD=1' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=1,DEV=0 [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.modem.0:CARD=1' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=1,DEV=0 [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.modem.0:CARD=1' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline [audio_listener-1] ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.1.pcm.modem.0:CARD=1' [audio_listener-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [audio_listener-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory [audio_listener-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM phoneline [audio_listener-1] ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp [audio_listener-1] ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp [audio_listener-1] ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card [audio_listener-1] ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card' [audio_listener-1] ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card [audio_listener-1] ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'

jackd

mhubii commented 2 months ago

Seems like you are having trouble running the audio driver

codingBigBird commented 2 months ago

Hi mhubii, thanks for reaching with me.
Yes I know this is the problem of audio driver, but there is a few solution on the internet. I tried 'https://stackoverflow.com/questions/7088672/pyaudio-working-but-spits-out-error-messages-each-time' but it did not work. Anything else I can do to fix the it?

mhubii commented 2 months ago

so essentially I have no experience with that sorry. But you need to be able and run this node for grabbing audio (also launched as part of the bringup package):

ros2 run audio_listener audio_listener
codingBigBird commented 2 months ago

Hi I solve the ALSA lib problem. https://stackoverflow.com/questions/65079325/problem-with-alsa-in-speech-recognitionpython-3 But the server doesn't run in ros. Sorry about these questions I don't know so much about ROS2. image Screenshot from 2024-07-10 16-07-14

mhubii commented 2 months ago

No worries, maybe try pull the latest changes.

You can list nodes in terminal with ros2 node list.

You can run rqt_graph to observe the ROS 2 graph.