Android MVP for a local/offline vehicle voice assistant.
M3 keeps the Android foreground-service audio shell and adds sherpa-onnx keyword spotting:
- Kotlin Android app package:
com.company.vehiclevoice - Debug
MainActivitywith start, stop, and clear-log buttons - Runtime permission request for microphone and Android 13 notifications
VoiceForegroundServicethat starts and stops as a foreground service- Foreground notification with a stop action
AudioRecorderusingAudioRecordat 16 kHz, mono, PCM16- 20 ms PCM frames with live RMS displayed on the debug page
- sherpa-onnx Android CPU AAR packaged for
arm64-v8a - KWS model assets copied on first start to
filesDir/models/kws - Wake words:
小智小智and你好小智 - Audio frames flow into
KwsEngine; wake hits switch service state fromIDLE_KWStoLISTENING - No VAD, ASR, TTS, Redis, Unity integration, or network permission yet
Open this folder in Android Studio and use:
Build -> Build APK(s)
Or build from PowerShell with the checked-in Gradle Wrapper:
.\gradlew.bat :app:assembleDebugThe project deliberately does not request INTERNET permission for the phone mock stage.