Closed HeavyMoon closed 3 years ago
It could be an audio problem; it's encouraging that you get the Heard:
log entry sometimes.
That said, it's probably something about ear
and your microphone.. if the stream is noisy enough, it might not stop listening.
HeavyMoon, Jshort helped me today. I had the same problems as yourself. The problem lies in oa/modules/ear/init.py,
Had to change the timeout from none to 6.5 on my machine to get it to work, Its worth a try. It worked for me
thank you for comments.
by changing timeout of ear, voice command 'boot mine' is working without R2D2 sound.
and other voice commands not detect before voice
command.
pi@assistant:~/oa-core $ cat oa/modules/ear/__init__.py | grep \"timeout\":
#"timeout": None,
"timeout": 6.0,
pi@assistant:~/oa-core $ python3 -m oa -d
[2021-05-17 21:45:42,660] INFO MainThread __main__: Start Open Assistant
[2021-05-17 21:45:42,684] INFO MainThread oa.core.hub: Loading Modules <- /home/pi/oa-core/oa/modules
[2021-05-17 21:45:42,686] INFO MainThread oa.core.util: mind <- /home/pi/oa-core/oa/modules/mind
/usr/lib/python3/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.4) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
[2021-05-17 21:45:43,406] INFO MainThread oa.core.util: ear <- /home/pi/oa-core/oa/modules/ear
[2021-05-17 21:45:44,327] INFO MainThread oa.core.util: speech_recognition <- /home/pi/oa-core/oa/modules/speech_recognition
[2021-05-17 21:45:44,394] INFO MainThread oa.core.util: sound <- /home/pi/oa-core/oa/modules/sound
[2021-05-17 21:45:44,400] INFO MainThread oa.core.util: voice <- /home/pi/oa-core/oa/modules/voice
[2021-05-17 21:45:44,412] DEBUG mind oa.core.hub: Starting
[2021-05-17 21:45:44,414] DEBUG ear oa.core.hub: Starting
[2021-05-17 21:45:44,416] DEBUG speech_recognition oa.core.hub: Starting
[2021-05-17 21:45:44,417] DEBUG sound oa.core.hub: Starting
[2021-05-17 21:45:44,419] DEBUG voice oa.core.hub: Starting
OA> [2021-05-17 21:45:44,424] INFO mind oa.modules.mind: Loading minds...
[2021-05-17 21:45:44,425] INFO mind oa.modules.mind: <- root.py
[2021-05-17 21:45:44,790] INFO mind oa.modules.mind: <- boot.py
[2021-05-17 21:45:44,793] INFO mind oa.modules.mind: Minds loaded!
[2021-05-17 21:45:44,794] INFO mind oa.modules.mind: Opening Mind: boot
[2021-05-17 21:45:44,795] DEBUG mind oa.modules.mind: "boot" is now listening. Say "Boot Mind!" to see if it can hear you.
[2021-05-17 21:45:50,463] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:45:51,916] INFO speech_recognition oa.modules.speech_recognition: Heard: BOOT MIND
[2021-05-17 21:45:51,917] DEBUG speech_recognition oa.core.hub: speech_recognition -> mind
[2021-05-17 21:45:51,919] DEBUG mind oa.modules.mind: Input: BOOT MIND
[2021-05-17 21:45:51,924] DEBUG speech_recognition oa.modules.speech_recognition: Muted
[2021-05-17 21:45:56,480] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:02,495] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:08,510] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:14,526] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:20,542] DEBUG ear oa.core.hub: ear -> speech_recognition
voice a
[2021-05-17 21:46:22,772] DEBUG MainThread oa.util.repl: voice <- a
OA> [2021-05-17 21:46:22,774] DEBUG voice oa.modules.voice: Saying: a
[2021-05-17 21:46:22,776] DEBUG speech_recognition oa.modules.speech_recognition: Muted
[2021-05-17 21:46:23,355] DEBUG speech_recognition oa.modules.speech_recognition: Unmuted
[2021-05-17 21:46:26,559] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:27,601] INFO speech_recognition oa.modules.speech_recognition: Heard: HELP LIST
[2021-05-17 21:46:32,576] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:33,849] INFO speech_recognition oa.modules.speech_recognition: Heard: MIND
[2021-05-17 21:46:38,590] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:40,975] INFO speech_recognition oa.modules.speech_recognition: Heard: OPEN ASSISTANT
[2021-05-17 21:46:40,976] DEBUG speech_recognition oa.core.hub: speech_recognition -> mind
[2021-05-17 21:46:40,977] DEBUG mind oa.modules.mind: Input: OPEN ASSISTANT
[2021-05-17 21:46:40,979] INFO mind oa.modules.mind: Opening Mind: root
[2021-05-17 21:46:44,606] DEBUG ear oa.core.hub: ear -> speech_recognition
[2021-05-17 21:46:46,850] INFO speech_recognition oa.modules.speech_recognition: Heard: LIST COMMANDS
[2021-05-17 21:46:46,850] DEBUG speech_recognition oa.core.hub: speech_recognition -> mind
[2021-05-17 21:46:46,852] DEBUG mind oa.modules.mind: Input: LIST COMMANDS
[2021-05-17 21:46:46,853] DEBUG voice oa.modules.voice: Saying: - The currently available voice commands are:
ROOT MIND,
CLOSE ASSISTANT,
LIST COMMANDS,
WHAT CAN I SAY,
READ WORLD NEWS,
RUN DIAGNOSTICS,
SING A SONG,
WHAT DAY IS IT,
WHAT DID I SAY,
WHAT IS THE WEATHER,
WHAT TIME IS IT
Uhmm...
The first issue was solved by setting the timeout. And the lack of wav sounds seems to be a problem with the playsound library.
Mute after the "boot mind" command has been improved by adding a say function.
@command("boot mind")
def response_sound():
say('start boot mind') ## add
play('r2d2.wav')
thank you for your great help.
Describe the bug i'm trying oa on raspberry pi. no response for voice command 'boot mind'.
To Reproduce Steps to reproduce the behavior:
Expected behavior sounds R2D2.
Additional context
voice
andquit
looks working. but voice commands are no response.When i exit with q command, speech_recognition message appear sometimes.
what can i do next? does anyone try on raspberry pi and work it fine?