#How to stop processing voice assistant pipeline in ESPHome

11 messages ยท Page 1 of 1 (latest)

crystal gale
#

Hey, I want create extra switch in ESP device to enable or disable processing voice assistant pipeline. I know how to create switch:

switch:
  ...
  - platform: template
    name: Disable processing response
    id: disable_processing_response
    optimistic: true
    restore_mode: ALWAYS_OFF

but I don't know how to stop processing pipeline when I will have text converted from voice and save in other sensor. Does anyone know if I can do something like this?

voice_assistant:
  ...
  on_stt_end:
    - text_sensor.template.publish:
        id: text_request
        state: !lambda return x;
    - if:
        condition:
          and:
            - switch.is_on: disable_processing_response
            - voice_assistant.is_running
        then:
          - ???HOW TO STOP PROCESSING PIPELINE THERE???

After activating the microphone, I would like to only process the spoken text without continuing its processing in intents and without waiting for the assistant's response.

runic pagodaBOT
#

ESPHome is a system to control your ESP8266/ESP32, with a native integration for Home Assistant.

You can find their documentation here, and get help with ESPHome itself here in the #diy-archived channel (#integrations-archived for the Home Assistant side integration with it). They also have their own Discord server too.

fierce dock
#

#1284966915055288530 may be better able to answer that

crystal gale
#

I read the documentation and didn't find anything that would solve this problem. I also asked a question in another group, but I don't have an answer yet. The configuration should be in ESP, so I'm not sure on which channel this question should be asked correctly ๐Ÿ™‚

fierce dock
#

The dev channel wasn't the place to ask a support question...

crystal gale
#

Can we move this request to proper channel or I should create other question ๐Ÿ˜€

fierce dock
#

Sadly there's no move option

#

We'd love that to exist ๐Ÿ˜„

slow gate
#

have you tried voice_assistant.stop as that should stop the pipeline at whatever point you add it

crystal gale
#

I've already checked it and unfortunately it doesn't work... the pipeline is constantly being processed until a response is obtained:

  on_stt_end:
    - text_sensor.template.publish:
        id: text_request
        state: !lambda return x;
    - if:
        condition:
          - switch.is_on: disable_processing_response
        then:
          - voice_assistant.stop
slow gate
#

ahh was worth a shot ... is the aim to just output the request text to the sensor and that's it ?