Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

LiveSpeech cant recognize anything, it needed pulseaudio? #56

Description

@ismailryt

Okay first i want to tell you the device i use

  • Raspberry pi 4
  • ReSpeaker 4Mic Array

I already read #23 , so i follow the instruction to uninstall pulseaudio , becuase in the #23 i read "ERROR continuos.c" maybe when you builded sphinxbase the Raspberry choosed pulseaudio instead of ALSA . And yeah there is no error like that, and i change init.py to use ad_alsa instead of ad_pulse. Everything worked fine , i can do pocketsphinx_continuous ... (Using my lm and dict) in terminal and it work great, no error and 80% right recognition.

So i move to code in python, this when error happen, i use this code

import os
from pocketsphinx import LiveSpeech, get_model_path

model_path = '/home/pi/try/poketsphinx'

speech = LiveSpeech(
audio_device='plughw:1,0',
verbose=False,
sampling_rate=16000,
buffer_size=2048,
no_search=False,
full_utt=False,
hmm=os.path.join(model_path, 'en-us-id'),
lm=os.path.join(model_path, '0175.lm'),
dic=os.path.join(model_path, '0175.dic')
)

for phrase in speech:
print(phrase)

There is no error output, but no single word recognized.. first i think my microphone broken, so i try using speech recognition and audacity, it can record my voice.. I was very helped with any help, I will follow any directions because i need this in my thesis...

Additional information:

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: seeed4micvoicec [seeed-4mic-voicecard], device 0: bcm2835-i2s-ac10x-codec0 ac10x-codec.1-003b-0 [bcm2835-i2s-ac10x-codec0 ac10x-codec.1-003b-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #15

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions