Skip to content

Allow to reuse VoiceSatelliteService with a custom frontend #44

@xvello

Description

@xvello

Thanks a lot for your work on this implementation! I am currently using Assist with two cheap esp32 devices and want to upgrade to hardware with better microphone sensitivity. It turns out that second-hand Android phones offer significantly better mic sensitivity than any off-the-shelf hardware that esphome supports, so I'm testing out your project.

One of the satellites I want to replace is in the kitchen and is set up to display timer progress on its screen. I understand that this is out of scope for this project, but I ruled out the alternatives (WallPanel because Assist timers are not exposed to dashboards, View Assist has too many moving pieces, the Ava fork does too much) and would rather build on top of your project.

Instead of forking your project, I'd rather build my own simple UI in Kotlin and import VoiceSatelliteService as a library, upstreaming improvements when they make sense.

I see three options I'd like to discuss with you, in order of preference:

  • The simplest way to serve my use case is to add a LiveData field that contains the latest MessageLite received from HA, accessible to the UI through the ServiceViewModel. It could also be used in your stock UI to show the STT/TTS strings for debugging. I'll need to confirm that quick-fire updates are sent sequentially to observers without skipping intermediate states.
  • The most flexible option would be to make the VoiceSatelliteService and VoiceSatellite open for subclassing and set a few members as protected instead of private, to allow overriding VoiceSatellite.handleMessage. I am fine with occasional breaking changes and would have more "knobs to turn" for future use cases.
  • The least intrusive option would be to emit Broadcast messages and have my UI be a separate process, but I'd rather not have to keep two APKs up to date and running.

I hope you'll agree with one of these options that allows sharing efforts on VoiceSatelliteService while opening an escape hatch for features that don't match the scope you want to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions