mallorbc / whisper_mic

Project that allows one to use a microphone with OpenAI whisper.
MIT License
705 stars 158 forks source link

Mic not automatically recognized on laptop #2

Closed nn81 closed 2 years ago

nn81 commented 2 years ago

Hello,

I'm trying the code on my linux laptop (ubuntu-based, Linux mint 20). The installation went well but when arriving to "Say something" there are some error messages related to the microphone detection:

ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card

I've installed the additional portions as mentioned on the README but still no dice.

How would we get this sorted?

Thanks!

nn81 commented 2 years ago

To solve this situation I've attached a USB microphone and then worked great, albeit still with the same error message.

Just seems unable to get it directly from the laptop microphone. Other than that, excellent work.

mallorbc commented 2 years ago

Yes, the message occurs even when working. I was not aware built-in mics would not work. Perhaps the threshold just needs to be lowered?

nn81 commented 2 years ago

I've tested with headphone mics, a dedicated microphone and finally a conference room mic/speaker.

The conference room one works best for this purpose, but no internal mic yet on Linux (Mint 20). Anyways, not a big deal.

trappedinspacetime commented 1 year ago

Unfortunately it fails to detect built-in mic on Ubuntu 22.04 Mate.

        python mic.py --model tiny
        ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
        ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
        ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
        ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
        ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
        ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
        ALSA 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 card
        ALSA 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
        Say something!

There is no response.