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

slave node not getting responses back #9

Closed
jacopomaroli opened this issue Feb 22, 2020 · 6 comments
Closed

slave node not getting responses back #9

jacopomaroli opened this issue Feb 22, 2020 · 6 comments

Comments

@jacopomaroli
Copy link

Hi there! First let me congratulate for the amazing job. It's a very interesting architecture and it has a lot of potential to become a very interesting project. keep up the good work!

I'm having a small issue. I have 2 components in my setup:

  1. rpi4 running mycroft and a HiveMind master instance as pi@raspberrypi:~/HiveMind-core $ python3 examples/mycroft_master.py
  2. rpi0 with an audio module (respeaker mic array v2.0) running voice satellite as
    pi@raspberrypi:~/HiveMind-voice-sat $ PYTHONPATH=$("pwd") python3 voice_satellite/__main__.py

I can talk to mycroft through the slave but I'm not getting any response back.
Reading the code is not really even clear how that should happen since HiveMind master doesn't seems to even establish a connection to the mycroft websocket.
If I open a websocket connection against the mycroft ws I can clearly see "speak" events being fired and I can see some handlers to play it in HiveMind-voice-sat.
Also I see on the main picture in the HiveMind-voice-sat readme that it should play back audio messages from mycroft.

It seems I'm missing a tiny bit but I can't figure out what

@JarbasAl
Copy link
Member

Hi there, the voice_satellite uses https://github.com/OpenJarbas/py_responsivevoice for TTS, but responsive voice changed its internal api and that package is currently broken, that is the reason you do not get an answer, the speak message should be received in the voice satellite, but there is no playback

I will change TTS to use google in the meantime and you should be able to hear your responses again!

If you think you are having a different issue please try connecting the remote_cli slave and verify that you are receiving the answers

@JarbasAl
Copy link
Member

master connects to mycroft websocket here

@jacopomaroli
Copy link
Author

my suspect about being a problem with master's websocket listener is derived by the fact that I don't see this entry log if I uncomment this line https://github.com/OpenJarbas/HiveMind-core/blob/2a2dcafe56ff46ad620de431e61deccbd9dd3be2/jarbas_hive_mind/master/__init__.py#L73 by modifying the file /home/pi/.local/lib/python3.7/site-packages/jarbas_hive_mind/master/__init__.py

I don't see log entries running either in HiveMind master and HiveMind-voice-satellite when mycroft is emitting "speak" events

regarding HiveMind-cli this is what I get:

pi@raspberrypi:~/HiveMind-cli $ python3 ./cli_satellite
22:44:55.809 - jarbas_hive_mind:secure_connect:60 - INFO - Connecting securely to wss://192.168.1.7:5678
22:44:56.081 - jarbas_hive_mind.slave.terminal:onConnect:18 - INFO - HiveMind connected: tcp4:192.168.1.7:5678
22:44:56.120 - jarbas_hive_mind.slave.terminal:onOpen:23 - INFO - HiveMind websocket connection open.
 INPUT: what time is it
 YOU: what time is it

and these are the master logs

22:44:55.956 - jarbas_hive_mind.master:onConnect:20 - INFO - Client connecting: tcp4:192.168.1.9:51856
22:44:55.957 - JsonDatabase - DEBUG - Json /home/pi/jarbasHiveMind/database/clients.db loaded
22:44:55.958 - JsonDatabase - DEBUG - Json /home/pi/jarbasHiveMind/database/clients.db loaded
22:44:55.962 - JsonDatabase - DEBUG - Json /home/pi/jarbasHiveMind/database/clients.db loaded
22:44:55.963 - JsonDatabase - DEBUG - Json /home/pi/jarbasHiveMind/database/clients.db loaded
22:44:55.971 - jarbas_hive_mind.master:register_client:172 - INFO - registering client: tcp4:192.168.1.9:51856
22:44:55.986 - jarbas_hive_mind.master:onOpen:65 - INFO - WebSocket connection open.
22:45:02.927 - jarbas_hive_mind.master:onMessage:74 - DEBUG - Text message received: {"msg_type": "bus", "payload": {"data": {"utterances": ["what time is it"], "lang": "en-us"}, "type": "recognizer_loop:utterance", "context": {"source": "tcp4:192.168.1.7:5678", "destination": "hive_mind", "platform": "JarbasCliTerminalV0.2"}}, "node": "tcp4:192.168.1.7:5678:SLAVE", "source_peer": "tcp4:192.168.1.7:5678"}
22:45:02.932 - jarbas_hive_mind.master:handle_incoming_mycroft:298 - INFO - Forwarding message to mycroft bus from client: tcp4:192.168.1.9:51856

that's basically it. nothing more. that's why I suspect master is not relaying messages to slaves

also, thanks for taking care of the TTS. that would have been the next issue I would have had :)

@JarbasAl
Copy link
Member

can you confirm you are on latest mycroft-core? hive mind requires MycroftAI/mycroft-core#2461 to work, this has only been merged recently

@jacopomaroli
Copy link
Author

Success! I read already about this pr being merged onto the mycroft forum. I wrongly assumed it was already on master. Switching my mycroft branch to dev caused log entries onto the slave node related to TTS to be showed!

As you stated it failed to actually play back something because of responsivevoice APIs changes.

Let me know if there’s a simple way to switch to google TTS so I can do it myself or else I’ll just wait for the update :)

Thanks for the support!

@JarbasAl
Copy link
Member

voice_sat now supports multiple TTS engines

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