Making Rhasspy interact with APIs and speak out information

I’m sorry, I’ve edited my previous response to add more logs. The logs say that there was no session, maybe that is the problem? Thanks so much for your help!

Does aplay function from the command line with an example wav?

Yes it is, I’ve tried playing a wave file before and after rhasspy recognized my intent and it works fine but I still don’t hear the time returned by the handler.

Can you clarify your actions from begin to end?

Because I see 1 session: e751cd4d-efd9-4128-8eba-a063e8f25d92
But there is no DialogueStartSession in your logs, so at the end of the script you can see the messages for DialogueEndSession:

[DEBUG:2020-08-17 13:01:19,945] rhasspydialogue_hermes: <- DialogueEndSession(session_id='e751cd4d-efd9-4128-8eba-a063e8f25d92', site_id='default', text="It's 13 01", custom_data=None)
    [ERROR:2020-08-17 13:01:19,946] asyncio: Task exception was never retrieved
    future: <Task finished coro=<HermesClient.publish_all() done, defined at rhasspy-hermes/rhasspyhermes/client.py:368> exception=AssertionError('No session')>
    Traceback (most recent call last):
      File "rhasspy-hermes/rhasspyhermes/client.py", line 370, in publish_all
      File "rhasspy-dialogue-hermes/rhasspydialogue_hermes/__init__.py", line 668, in on_message
      File "rhasspy-dialogue-hermes/rhasspydialogue_hermes/__init__.py", line 375, in handle_end
    AssertionError: No session
    [DEBUG:2020-08-17 13:01:19,956] rhasspyserver_hermes: Sent 370 char(s) to websocket

The dialogue manager does not know what to do with that unknown sesssion and generates an error, and does not send the text to your TTS system, resulting in not playing audio

1 Like

Thanks so much for your reply @romkabouter ! After installing rhasspy I ran the rhasspy --profile en command and opened up another terminal and ran python3 examples/time_app.py --port 12183 --host 10.0.2.15 --debug, and after both of them were up and running I went to localhost on the web interface and spoke to rhasspy and it recognized my intent. Is there a step that I’m missing? Again, thanks so much for helping you’re a lifesaver!

Did you speak to Rhasspy after saying the wake word? I don’t think there’s a session started without a wake word.

I click on the Wake Up button on the web interface and then speak my command, i thought the wake up button acts like a wake word. Should I set up a wake word first?

I’m not sure this will make a difference, but the whole voice stack setup is fairly finicky, so yes, I suggest you set up first a wake word and verify that this all is working before you start with intent handling. It will make debugging problems easier if we know that all the rest is already in a working state.

2 Likes

I suggest setting up the wakeword as well, you should hear confirmation sounds.
If you do hear them, you know that the aplay command is working.

1 Like

I set up the wake word and it worked!! Thanks so much for all your help @koan and @romkabouter, you made someone really happy.

2 Likes

Additionaly: you need a message to DialogueStartSession when you want to manually start a session :slight_smile:

1 Like

Hello! One last question, what is the best way to send this to other people to work on? Should I commit all the files to github or build a docker image?

Creating a GitHub project is probably better if you want to attract contributions.

So should I upload all the files produced after installation? I want them to have my profile and the sentences I added with my settings.

Your sentences.ini and the contents of the slots directory should suffice.

1 Like