Code Monkey home page Code Monkey logo

Comments (4)

joshuashort avatar joshuashort commented on August 29, 2024

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.

from oa-core.

robert478 avatar robert478 commented on August 29, 2024

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

from oa-core.

HeavyMoon avatar HeavyMoon commented on August 29, 2024

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...

from oa-core.

HeavyMoon avatar HeavyMoon commented on August 29, 2024

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.

from oa-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.