gpt4 book ai didi

linux - 语音识别 : jack server is not running

转载 作者:IT王子 更新时间:2023-10-29 00:34:17 25 4
gpt4 key购买 nike

我正在使用 speechRecognition python 库设置声音识别器。

到目前为止,这是我的代码:

#!/usr/bin/env python3

import speech_recognition as sr

r = sr.Recognizer('es-MX')

with sr.Microphone() as mic:
audio = r.listen(mic)

print(r.recognize(audio))

运行我得到

ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_l$
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
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

我正在使用 SpeechRecognition 版本 1.3.1,运行在 Linux LXLE 14.04 x64 和 python 3.4 上

最佳答案

它告诉您它无法在您的设备上录制音频。它与插孔服务器无关,它还会尝试打开 alsa 设备和蓝牙音频设备。确保您的设备上的音频设置正确。另见

PyAudio does not work and bricks sound on ubuntu

PyAudio working, but spits out error messages each time

关于linux - 语音识别 : jack server is not running,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31642765/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com