Wakeword setence response unwaiting

Hello, I wish that when I pronounce “Jarvis”, Snips answers me a sentence.
I have as configuration: Raspberry pi 3B+, Raspbian 9(stretch).
Until now, I was:

WAKEWORD = ‘hermes/hotword/default/detected’

def on_message(client, userdata, msg):

if msg.topic == WAKEWORD:
beginTalk(“Hello, let’s play !”)

def beginTalk(text):
mqttClient.publish(‘hermes/dialogueManager/startSession’, json.dumps({
‘siteId’: ‘default’,
‘init’: {
‘type’: ‘action’,
‘canBeEnqueued’: False,
‘text’: text
}
}))

my problem is after “Jarvis”,He waits for an Intent for 4 seconds, and this one not arriving he sends the text that I ask him.
I tried: type:notification, canBeEnqueued:True… without success…
I wish he would do it immediately after wakeword, without waiting to know if an Intent will arrive…
Thank you very much.

Hello Tengu,

Have a look at this forum response https://forum.snips.ai/t/change-wake-word-response/2419/4.

I think this is what you want.

Regards

Richard

Good evening and thank you for your answer
I’m not trying to disable audio feedback, I just want to be able to say a welcome phrase directly when “Jarvis” is spoken.

In the response was also mentioned that you can change the wav file with your own wav file, which can contain any sentence that you want. As stated:

You can change the wav files in /usr/share/snips/assistant/custom_dialogue/sound/ , but they will be overwritten after each update of the assistant.

So if you create a wav file containing: Hello, let’s play ! and put that in the correct directory with the right name, it will work.

Hello, yes indeed it is a way to do it. : -)
This can’t work for me because depending on the circumstances my welcome phrase will have to change… if the previous part is not finished for example.
But thank you very much.

If that is the case, then I think you should be able to do that as well.

If you want to say something through snips you can do that at any time and any moment you want to. You can ask the tts to say any sentence you want. Just use the topic: hermes/tts/say

You should be able to send the following content (with thanks to @Philipp for Web Test) to that topic and you default site should say it.
{“text”:“Hello, let’s play !”,“lang”:“en”,“id”:“none”,“siteId”:“default”,“sessionId”:“none”}

i think there might just be something Snips has been working and that might have get documented at some point which may make doing what is being talked about here a bit easier…

there is a mqtt topic to register wav files
hermes/tts/registerSound/my_name_of_sound which you pass in the message a wav file binary

snips watch outputs this

[10:05:35] [Tts] was asked to register a wav of 10.3 kB with id 'my_name_of_sound'

I believe Snips is working on many things that need attention in the background… I even found a reference to replayResponse for the audioServer, which i guess would play again what was last said

will have to wait and see :slight_smile:

Thank you Vandaag. I thought to do with hermes/tts/say but in documentation :

Note that this is a low-level API, and it is not recommended to be used of production. You should use the following topics instead, based on the dialogue manager:

  • hermes/dialogueManager/startSession

  • hermes/dialogueManager/continueSession

See the Dialogue API Reference for further explanations.

But, I will use this. :slight_smile:

I would do as in your case it is not a session, but a single response to the wake word.

yes i would NOT use tts… tts is really only for internal use and in no way does the dialogue manager or hotword etc know its in use.
If the TTS is saying something from you calling tts directly and you say the hotword, the asr will hear the tts audio also
Not a good idea

It’s OK ! :slight_smile:
I will find the good solution !