Helper library to develop Rhasspy apps in Python

Might be me being stupid but how do I get rhasspy to actually answer via tts? I have set up the GetTime example, I connect to the mqtt server just fine and I do get the EndSession message and it looks right but nothing happens. Do I need to config rhasspy in a specific way for it to work?

EDIT: never mind… it works with a wakeword but not with the wake up button in the web gui. I have no idea why it does that but I am pretty sure that it is something rhasspy does differently with the wakeup button and normal working behaviour.

Yes I bumped into this too a while ago. I don’t remember the exact difference, but I think the wakeup button doesn’t initiate a full session. It’s best to test your app with “real” sessions beginning from a wake word you told yourself.

I normally don’t work with real sessions because I have been unable to actually get a wakeword working in a non annoying way. Best I got so far is raven and even that breaks after a while and activates on silence because my respeaker mic ends up creating random noise on one channel after a while without restart, those driver still don’t work well. It was a pretty big fight until I got the mic to behave good enough to actually record a wakeword.

It would be really nice if the button would actually work the same way rhasspy responds when I use a wakeword because it would testing just that much easier but I can see why that is pretty low on the priority list.

That’s a good point. I opened an issue on GitHub:

1 Like

It has been a while, but I released version 1.1.1, which is a minor release:

Changed

  • Updated dependencies. The most important one is the upgrade to rhasspy-hermes 0.5.0.

This fixes an encoding issue.

I have been busy with some other stuff and so I haven’t been active lately with Rhasspy and Rhasspy Hermes App, but if you have some ideas, requests, issues, just let me know here or on the project’s GitHub page. I’ll be happy to look into it.

1 Like

hi, i’m working on an vocal assistant for my thesis and your helper library helps me a lot so thanks already. My question is: is it possible to start a session without any wakeword. For example the launch of a survey if it has been more than 24 hours since the user has used the tool. I saw that there was the notify function which could also be useful to notify the user that it has been a while since he has used the service but I do not understand the side id argument, it is on localhost:1883 that the function should be set?

You should use the notify method indeed. The site_id argument is the site ID you entered in Rhasspy’s settings. So it’s not a hostname/port combination, but the name you assigned to that device, such as default.

I just realized you want to launch a survey. The notify method is used if you want to inform the user of something without expecting a response. But if you want to ask the user something and expect a response, so like a real session but initiated by the app instead of by the user telling the wake word, you have to start a session with a DialogueAction initialization description.

ok i understand. But I try to put in a function app.notify(“test”,“default”) with the default parameter as i can see in my rhasspy interface but it doesn’t work.

With the examples and the documentation I managed very easily to use the sessions and associate them to intents but it is very confusing to launch a notification or a dialog. I guess it’s the same as opening a client mqtt.Client() and connect the client on the localhost with port 1883 and then publish(DialogueStartSession(init=notification, site_id=site_id)). But this means not using this library anymore. Would it be possible to create an example of using notification and login as for the rest to make this library even more efficient as it is intended to facilitate the use of rhasspy via hermes?

I’m not sure why this doesn’t work, I’ll try to reproduce this later.

But you can still use Rhasspy Hermes directly in your Rhasspy Hermes App code. The HermesApp class inherits from HermesClient, so you can just publish any Rhasspy Hermes message from your app with app.publish(...).

I have added an example app to show how to use the notify method:

This works for me. Let me know if you have some problems in your setup.

1 Like

I have now also added documentation on how to continue a session in Rhasspy Hermes App:

This works now because rhasspy-nlu-hermes issue #3 has been fixed in Rhasspy 2.5.10.

2 Likes

I’ve published a new bugfix release for rhasspy-hermes-app, version 1.1.2. I also enabled GitHub Discussions in the repository.

2 Likes