Voice assistant chat injections

Hi there!
As many others, I have set up a voice assistant based on HomeAssistant using the OpenAI compatible API locally in my language (Whisper.cpp, Llama.cpp, Xttsv2 with custom integrations). I use Atom ECHO as a microphone and speakers.

Very often, Echo falsely triggers the wake word, and in such cases, Whisper returns me hallucinations - for example, text with the word “Subtitles”. How can I insert a process to check for the word “Subtitles” in the text received from STT and cancel the dialogue if it’s present?

All this is necessary for me to develop and use functions that I want to implement in HomeAssistant, as implemented in this integration extended_openai_conversation/custom_components/extended_openai_conversation at main · jekalmin/extended_openai_conversation · GitHub

Configuration:

stt:

  • platform: whisper_api_stt
    api_key: “apikey”
    model: “whisper”
    media_player:
  • name: MopidyDepo
    host: 192.168.0.31
    port: 6680
    platform: mopidy

Perhaps you could include “subtitles” in custom_sentences/en/_common.yaml under skip_words?

Not sure how this connects with false triggers, though. I use Willow, and in the configuration there is a “wake word recognition” setting which you can adjust if the device is waking up when it shouldn’t. Perhaps you have something similar?

Incidentally:

How to format your code in forum posts

Add in the prompt:
You received content containing subtitles and only replied with: “.”.