ubuntu中specch识别错误

问题描述

我正在尝试在 ubuntu 中进行语音识别。我有这个错误。我找不到任何具体的解决方案,请帮忙:)

import speech_recognition as sr
listner = sr.Recognizer()
try:
    with sr.Microphone() as source:
        print("Listening..")
        voice = listner.listen(source)
        commnand  = listner.recognize_google(voice)
        print(commnand)

except:
    pass



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
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,skipping unlock
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
Listening..

[错误快照在这里] :https://i.stack.imgur.com/HSV7v.png

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)