SpeechRecognition: jack server not running

I am creating a sound recognizer with the python speechRecognition library.

This is my code:

#!/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))

When I start, I get

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

I am using SpeechRecognition version 1.3.1 running on Linux LXLE 14.04 x64 with python 3.4

+4
source share
1 answer

He tells you that he cannot record audio on your device. It is not connected to the connector server, it is also trying to open the alsa device and the Bluetooth audio device. Make sure the sound is correctly installed on your device. See also

PyAudio doesn't work, and bricks sound on ubuntu

PyAudio works, but it gives error messages every time

+2
source

Source: https://habr.com/ru/post/1599765/


All Articles