Add assist_satellite.ask_question and assist_satellite.start_conversation capabilities#318
Add assist_satellite.ask_question and assist_satellite.start_conversation capabilities#318RemyRoux wants to merge 2 commits intorhasspy:masterfrom
Conversation
|
Closes: #316, home-assistant/core#148055 |
Since the development is so slow, I added them myself, based on this PR: github[.]com/rhasspy/pull/318
|
Thanks, I've needed this for my automations for a while now. I forked your PR and tried by patching the home assistant. assist_satellite.start_conversation works perfectly (without affecting the wake word), but I couldn't get assist_satellite.ask_question to work. Do you have any idea why? (By the way, I'm using the wyoming-openai plugin as the AI.) |
|
Because there are some changes also required on the home assistant side as well. You need this: home-assistant/core@dev...RemyRoux:core:patch-1 The code needs to be loaded as a custom component in home assistant and voila. I have prepared a pull request to add it formally into HA but it's taking a while and it looks like the authors of the wyoming satellite are switching toward a esphome solution. home-assistant/core#149149 |
|
I have been following your progress for the merge but i lost hope when linux-voice-assistant showed up untill today. Thank you a lot for your work. I didn't know i can use your work as custom component. But as a beginner i had hard time swithching, could you help me? -I deleted my old wyoming-satellite folder on my remote pi, |
|
Any idea when this PR willl be merged ? its not even allocated for review ? @RemyRoux if i need only start conversation will your fork work or it also has some dependecny on the core i looked at the PR you have created both for wyonming-sattelite and homeassistant core. What do you mean they are inclined towards esphome ? I have a Atom Echo running esphome which already supports start conversation. |
Thank you for your response. I use https://github.com/amitfin/patch to patch home assistant files. Before seeing your message, I had only patched the patch-2 changes you sent to the home assistant repository. Now, the only change in patch-1 that you refactored is this. So I deleted this line from patch-2: and replaced it with the one that you changed in patch-1: Long story short, I replaced the async_start_conversation method in patch-2 with your async_start_conversation method in patch-1. As a result, the list of the 3 files I patched is as follows: However, even though I pressed the button in the script I created for assist_satellite.start_conversation, the satellite does not start talking and then listening. Here is the script: The Wyoming satellite logs say the following:
System logs shows two errors: Actually, the function parameters in patch-2 look correct. This is the source of the error. I fixed the parameters and tried again. Now, after the announcement, the satellite listens to me and responds, but it doesn't switch to listening again. Doesn't this development attempt to achieve this with the assist_satellite.start_conversation action? Isn't this the difference between it and the assist_satellite.ask_question action? Or have I completely misunderstood? |
|
@RemyRoux Hi, i have been using linux-voice-assistant for a few weeks but i want to switch back to wyoming. I really want to install it via your fork but i had questions. Do you have spare time to help me? I would like to have continued and start convertsation on wyoming. |
|
This would be very cool, especially considering the almost perfect implementation with the just recently jailbroken Amazon Echo Shows Gen. 1 and Gen.2. I set them up with LineagueOS and wyoming protocol and those device work like a charm as a dashboard plus assist_satellite. I am now waiting for this feature to get implemented before I fully switch from Google Assistant to Voice Assist. |
Wyoming Satellite will be replaced by Linux Voice Assistant which already supports the newest features. |
I have now checked but as far as I am aware the unlocked and rooted Echo Show devices are all armeabi-v7a (32-bit) and thus not compatible with Linux Voice Assistant. So I assume there is no realistic chance of those devices being able to handle |
Perhaps a modified version for LVA could be developed to work on 32-bit, I was thinking of it, actually, and I am pretty sure that it's possible theoretically. Anyways, wyoming satellite will no longer be maintained as it will be replaced by LVA. |
|
To be honest, I have been using LVA (the imonlinux fork) on 2 raspberry pis, and it's been pretty stable, I don't really want to dive back into this code as it's been a while and even the original authors have moved to LVA. Regarding the Amazon Echo Show, I was able to successfully use it as an assist satellite by loading View Assist on it. So I am using the raspberry pi with a jabra speak 710 and I'm pretty sure that it's the best possible setup available currently. The mic is catching my voice extremely well. There are still issues with the wake word though, I'm going to try training my own and see if that helps. |
|
I see. But I assume wyoming protocol will then not be developed any further? So I could try to fork this repo and make my own edits to try to get this to work without risking having to do this all over when a new version of wyoming gets released? |
Try developing a dedicated version of LVA for 32-bit. |
|
I am a novice, which is why I am so hesitant to go into even forking wyoming. Since most of my coding adventures require extensive help from OpenAIs Codex, I am pretty sure any code I (and Codex) will produce, do not meet any standards which would make them fit for online publication. |
Proposed change
This PR introduces a new capability to the
WakeStreamingSatelliteto allow a connected server (like Home Assistant) to remotely trigger the satellite's listening state.Currently, the
WakeStreamingSatellitecan only begin streaming microphone audio after it has locally detected a wake word. This makes it impossible for the server to initiate an interaction, such as asking the user a question via TTS and then waiting for a spoken response.This change modifies the event_from_server method to handle a
Detectionevent received from the server. This event acts as a command, instructing the satellite to immediately start streaming audio, just as if a local wake word had been detected. This enables powerful new services likeassist_satellite.start_conversationandassist_satellite.ask_questionin server-side applications.To avoid conflicts with real wake words, the logic is designed to respond to a specific, non-standard wake word name (e.g.,
command_start), and it correctly bypasses the local refractory period logic. The existing local wake word detection behavior is completely unchanged.Type of change
Additional information
This PR is the satellite-side implementation that complements the new
AssistSatelliteEntitysupport in Home Assistant Core (see home-assistant/core#149149). Both pieces are required for the new services to function.