DEV Community

Y H
Y H

Posted on

Building an Open Source Android Voice Assistant with Kotlin

Replace Google Assistant with Your Own AI

What if you could long-press your Home button and talk to YOUR AI instead of Google's?

I built OpenClaw Assistant - an open-source Android app that does exactly that.

πŸ“Ή Demo: https://x.com/i/status/2017914589938438532

πŸ”— GitHub: https://github.com/yuga-hashimoto/OpenClawAssistant

Features

  • 🏠 System Assistant Integration - Long-press Home to activate
  • 🎀 Custom Wake Words - "Jarvis", "Computer", or your own
  • πŸ“΄ Offline Wake Word Detection - Using Vosk, no cloud needed
  • πŸ”Š Voice I/O - Speech recognition + TTS
  • πŸ”— Any Backend - Connect to Ollama, OpenAI, Claude, or custom APIs

Tech Stack

Component Technology
UI Kotlin + Jetpack Compose + Material 3
System Hook VoiceInteractionService
Wake Word Vosk (offline)
Speech Android SpeechRecognizer + TTS
Network OkHttp + Gson

How It Works

  1. App registers as Android's digital assistant
  2. Vosk listens for wake words locally
  3. On activation, speech is transcribed and sent to your webhook
  4. Response is spoken via TTS

Get Started

git clone https://github.com/yuga-hashimoto/OpenClawAssistant
cd OpenClawAssistant
./gradlew assembleDebug
Enter fullscreen mode Exit fullscreen mode

Or download the APK from Releases.

Backend Setup

Works with OpenClaw or any webhook that accepts:

POST /your-endpoint
{"message": "user's speech", "session_id": "..."}
Enter fullscreen mode Exit fullscreen mode

And returns:

{"response": "AI's reply"}
Enter fullscreen mode Exit fullscreen mode

Contributions welcome! Let me know what you think.

Top comments (0)