My Voice Assistant PE with a custom voiceassist pipeline works great but the HA PE speaker is just awful. I could connect an external speaker but I already have several media players setup in the house. I found a way to call a webhook from my voice assist middleware (python) and play the file on one of those media players but, in this scenario, the HA PE device is stuck in a loop. The voice pipeline that started the “conversation” never delivers a streaming response back to HA PE. Does anyone know how to terminate a voice pipeline? HA PE stays unresponsive for a long time until it times out.
I use the script below for my webhook. The action assist_pipeline.stop is something Claude (AI) made up…it doesn’t seem to exist as far as I can tell.
My script:
alias: TTS response
description: “”
triggers:
allowed_methods:
POST
PUT
local_only: true
webhook_id: tts_response
trigger: webhook
conditions:
actions:
I can’t tell you how but look at esphome firmware for HAVPE
It is possible to change response script the create a maybe text sensor where the voice response posts. HA can take that response from the sensor and on_change or update (automation trigger) generat announcement on another device.
I’m not sure which scripts in HAVPE need change but I will take a look later and try to point you in a direction. It’s possible to send it directly to another esphome device but more complicated and I’d need think about how to do that.
The call for script I mention may also be removed to remove response capability from voice device. HA could also simply mute HAVPE to stop response
EDIT
So on_tts_start I think may control response but I will check more carefully. Just a quick guess after looking. You may be able to just have it do nothing here to kill the response. Or add mute to on_stt_start to basically mute any response then unmute after. You may be able to do this easily in HA using voice assistant state as trigger for automation that mutes and unmutes it. Sorry. I guess that is simplest solution
@tmjpugh using mute / unmute for the streaming response is a great suggestion. I’ll look into that. I currently switch between response modes (streaming or mp3 file) but I don’t see why I couldn’t just enable both and mute the stream.