You are not logged in.

#1 2014-09-11 09:35:53

neptyd
Member
Registered: 2014-09-11
Posts: 3

Problem with jack

Hi,

I'm trying to run my simple python script with using SpeechRecognition library, but i get a error when i try to listen on microphone:

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_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:947:(find_matching_chmap) Found no matching channel map
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
ls /dev/shm/
pulse-shm-1786803448*  pulse-shm-2918752564*  pulse-shm-528682629*
pulse-shm-2134045932*  pulse-shm-3577176364*  pulse-shm-589288251*
pulse-shm-2735481799*  pulse-shm-40907746*    pulse-shm-899524684*
pulse-shm-2827064006*  pulse-shm-4260734428*  sem.lastpassffsemaphore*
arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC663 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC663 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

I read other threads about it, and that don't resolve my problems, maybe someone have the same problem...
I will be very gratefull for any help.

Last edited by neptyd (2014-09-11 09:56:00)

Offline

#2 2014-09-11 10:15:54

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Problem with jack

neptyd wrote:

I read other threads about it, and that don't resolve my problems, maybe someone have the same problem...
I will be very gratefull for any help.

 Which threads have you read? Link them here for reference. You apparently use pulseaudio, which you do not mention. What simple python script is that? Does is take any arguments? Do you have pulseaudio-alsa installed?

arecord -lL;
lspci -vvnn | grep -A1 '040[1-3]'; cat /proc/asound/modules; amixer;
lsusb #if there is a usb sound card;
# or use the alsa-info script

Offline

#3 2014-09-11 10:40:10

neptyd
Member
Registered: 2014-09-11
Posts: 3

Re: Problem with jack

Hi,
Thank you for answer.
1) I read  this and this
2). I use SpechRecogniton for python link to library And my script is a first example "Recognize speech input from the microphone:"
3). Yes i have pulseaudio-alsa installed.

Last edited by neptyd (2014-09-11 10:41:00)

Offline

#4 2014-09-11 10:56:43

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Problem with jack

 Post the script here. I posted code for you to execute.

Offline

#5 2014-09-11 12:32:08

neptyd
Member
Registered: 2014-09-11
Posts: 3

Re: Problem with jack

Ok thanks wink

import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:                # use the default microphone as the audio source
    audio = r.listen(source)                   # listen for the first phrase and extract it into audio data

try:
    print("You said " + r.recognize(audio))    # recognize speech using Google Speech Recognition
except LookupError:                            # speech is unintelligible
    print("Could not understand audio")

Offline

Board footer

Powered by FluxBB