Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any advices to get it work properly? #16

Open
MoleHoleDev opened this issue Oct 24, 2023 · 3 comments
Open

Any advices to get it work properly? #16

MoleHoleDev opened this issue Oct 24, 2023 · 3 comments

Comments

@MoleHoleDev
Copy link

Hello, I already installed every lib and all dependencies and almost got it working, but It looks like mine bender recognizes random words. Looks like I need to do some configurations with amixer because it can't find any simple controls.
Im skipping mpc cuz its just music player as I think, and also errors with permissions to backlight, this will be not a much problem, but recognizing and responding is most valuable :)
Im asking you very kindly to help me with this, here my log via ssh:

/krets@raspberrypi:~ $ python3 robot.py
amixer: Unable to find simple control 'Capture',0

/bin/sh: 1: mpc: not found
Gpio 9 is illegal for LED channel 0
Process Process-1:
/bin/sh: 1: mpc: not found
Traceback (most recent call last):
File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/krets/profiles/bender/bender_backlight.py", line 150, in
'OFF': lambda: fill_pixels(self.pixels, no_color),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/krets/profiles/bender/bender_backlight.py", line 40, in fill_pixels
pixels.show()
File "/usr/local/lib/python3.11/dist-packages/adafruit_pixelbuf.py", line 204, in show
return self._transmit(self._post_brightness_buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/neopixel.py", line 180, in _transmit
neopixel_write(self.pin, buffer)
File "/usr/local/lib/python3.11/dist-packages/neopixel_write.py", line 42, in neopixel_write
return _neopixel.neopixel_write(gpio, buf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/bcm283x/neopixel.py", line 82, in neopixel_write
raise RuntimeError(
RuntimeError: ws2811_init failed with code -11 (Selected GPIO not possible)
volume = 20
self.volume = 20
amixer: Unable to find simple control 'Master',0

pocketsphinx_co: no process found
/bin/sh: 1: mpc: not found
['pocketsphinx_continuous -dictcase yes -inmic yes -ds 3 -samprate 8000 -logfn /dev/null -adcdev plughw:4,0 -hmm /home/krets/common/resources/en/cmusphinx-en-us-ptm-8khz-5.2 -dict /home/krets/profiles/bender/resources/en/bender.dic -jsgf /home/krets/profiles/bender/resources/en/bender.jsgf']
serving at :8008
pocketsphinx_continuous successfully started
Start mode:
utterance = reboot
Start mode:
utterance = set sleep to six seven eight oh one eight eight
Start mode:
utterance = please
Start mode:
utterance = please
Start mode:
utterance = next song
Start mode:
utterance = set sleep
Start mode:
utterance = set sleep
Start mode:
utterance = please
Start mode:
utterance = stop player
Start mode:
utterance = set sleep one
Start mode:
utterance = reboot

@sindar
Copy link
Owner

sindar commented Oct 25, 2023

Hello!
Yes, it's probably could be a problem with sensivity of the microphone.
Have you installed alsamixer? As I remember I lowered "Gain" control on the Mic(I'll check later).

@MoleHoleDev
Copy link
Author

MoleHoleDev commented Oct 29, 2023

Hello, alsamixer is installed, it seems like I have problems with pulse audio.
Just added
nano ~/.asoundrc

defaults.pcm.card 1
defaults.ctl.card 1

but with, same result.

Where I can reduce "mic gain"?


Edit:
In speech_recognizer.py: I uncommented + ' -remove_noise yes' with changing no to yes
In volume_control.py: changed "mixer -q -c 1 set "

Now im able to recognize some words like "reboot", "shutdown" or "turn off the blue light" but with low accuracy(saying: "turn on the green light")

@sindar
Copy link
Owner

sindar commented Oct 30, 2023

Well, it's the trickiest part with accuracy:) It depends on the ambient sounds, how close you're talking to, etc. I helped one guy with the same problem, it was really hard to get it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants