Is it possible to create an automation that is trigerred when assistant cannot understand a command and then sends a notification with the transcript of what it heard? Bonus points if it somehow also sends a link to the audio recording.
Sidenote: Whisper’s logs will show you the transcript of what it heard/processed.
Go to Settings > Add-ons > Whisper > Log tab
Example: INFO:wyoming_faster_whisper.handler: Hey there, community!
I couldn’t find any event fired by the voice assist pipeline that would readily allow to automate as you want.
But if you use ESPHome, you can do it by recording the various values from voice_assistant events and then detecting the proper set of conditions from an automation. Bonus, it can also serve as a history for voice commands, and allow replay of last TTS through the recorded URL or text.
alias: Voice Assist Error
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.voice_box_assist_in_progress
from: "on"
to: "off"
for:
hours: 0
minutes: 0
seconds: 2
condition:
- condition: state
entity_id: sensor.voice_box_last_tts
state: Sorry, I couldn't understand that
action:
- service: notify.persistent_notification
data:
title: Voice Assist Unrecognized Intent
message: >-
Understood: {{ states("sensor.voice_box_last_stt") }}
mode: single
Not sure about the STT recording, I couldn’t find anything being published to the /api/stt/{provider}endpoint or anywhere else… Maybe someone else will have better luck.