Experimental Android voice assistant for Home Assistant that uses the ESPHome protocol.
Intended for turning your existing Android wall panel or similar into a local voice assistant for controlling your smart home using Home Assistant.
- It exposes a port to allow incoming connections from Home Assistant with no authentication whatsoever (the device is the server in the ESPHome API) so shouldn't be used on any untrusted networks. Additionally the device needs to be reachable from Home Assistant for the app to function, which probably means the device will need to remain on the local network.
- It is constantly using the microphone to listen for the wake word, which is not only a privacy issue but also a battery drain. Android does not allow non-system apps to listen 'passively' like the built in assistants.
Requires Android 8 or above.
- Local wake word detection using up to two microWakeWord models
- Stop word detection
- Custom wake word support
- Voice commands
- Announcements and conversations
- Media player
- Microphone mute switch
- Wake/preannounce sounds
- Timers
- Improved Assist feedback on screen
- Display media playback status on screen
- Install and run the app
- Optionally change the satellite name and port settings
- Start the satellite service, it will continue to run in the background until manually stopped.
- In Home Assistant:
- Add or open the ESPHome integration
- The satellite should be auto-detected in most cases, if not, manually add the satellite using the device's IP address and configured port (Default: 6053)
- Complete the voice assistant setup wizard
Once connected, the satellite is fully configurable from within Home Assistant as a ESPHome voice satellite and media player, however some settings can also be changed from within the app.
- Name: The display name of the satellite. Requires service restart
- Port: The port to listen on. Requires service restart
- Autostart service: Whether to automatically start the satellite service on application start
- Wake word 1 and Wake word 2: The wake words to use (second is optional). Note that changing this in the app does immediately change the wake word, however currently the change is not reflected in Home Assistant. It is recommended to change the wake word from Home Assistant to ensure the configuration remains in sync.
- Custom wake words: Specify a directory on the device containing custom wake word models
- Enable wake sound: Whether to play a sound when the satellite is woken by a wake word
- Custom timer sound: Specify an audio file to play instead of the default one
- Repeat timer sound: By default, the timer sound is repeated until stopped by the user
The app includes a default set of wake words, however you can also specify a directory containing custom wake words supported by microWakeWord.
Create a directory on your device, copy the wake word model(s) as well as valid json file(s) describing each model (example), a minimum valid example json is:
{
"type": "micro",
"wake_word": "Custom Wake Word",
"model": "custom_wakeword.tflite",
"micro": {
"probability_cutoff": 0.97,
"sliding_window_size": 5
}
}
Choose the directory in the 'Custom wake words' setting in the app. The wake word(s) in the directory should now be selectable in the app, however you will need to restart the service in order for the new wake words to show in Home Assistant.
If your custom wake words do not appear, double check you have included a valid json file with at least the properties shown above.
- Clone the repo
- Open in Android Studio
You will need to redirect incoming connections on the server port to the emulated device
- From a terminal run
telnet localhost 5554to telnet into the emulator - Enter your auth token if required
- Run
redir add tcp:6053:6053to add a redirect for the server port (default 6053) to allow incoming connections to be routed to the device
