Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ak-123459/SnowKey

Repository files navigation

🔊 Snowboy Hotword Detection for Modern Android

Android Studio Kotlin Jetpack Compose License

This project brings back Snowboy Hotword Detection on modern Android devices using Kotlin, Java, and Jetpack Compose.

Snowboy was officially shut down in 2020, making it very hard to implement in today's Android ecosystem. I resolved multiple compatibility issues and successfully integrated Snowboy into a fully working Android app.


✨ Features

  • 🎤 Offline hotword detection (.umdl and .pmdl models supported)
  • 📱 Built with Kotlin + Java hybrid
  • 🖼️ Jetpack Compose UI integration
  • ⚙️ Supports arm64-v8a and armeabi-v7a architectures
  • 📦 Includes JNI & assets for easy setup
  • ✅ Runs on latest Android Studio & SDK

🛠️ Tech Stack

  • Languages: Kotlin, Java
  • UI Framework: Jetpack Compose
  • Native Integration: JNI (.so libraries from Snowboy)
  • IDE: Android Studio (Arctic Fox or newer)

📂 Project Structure

Snowkey
└── app
    ├── manifests
    │   └── AndroidManifest.xml
    ├── kotlin+java
    │   └── ai.kitt.snowboy
    │       ├── audio
    │       ├── ui.theme
    │       │   └── AssetHelper.java
    │       ├── Constants
    │       ├── Demo.java
    │       ├── MainActivity.kt
    │       ├── snowboy
    │       ├── SnowboyAppResCopy.java
    │       ├── SnowboyDetect.java
    │       ├── snowboyJNI
    │       └── SnowboyVad.java
    ├── ai.kitt.snowboy (androidTest)
    ├── ai.kitt.snowboy (test)
    ├── assets
    ├── jniLibs
    │   ├── arm64-v8a
    │   └── armeabi-v7a
    ├── res
    │   ├── drawable
    │   ├── layout
    │   ├── mipmap
    │   ├── raw
    │   ├── values
    │   └── xml
    └── Gradle Scripts

⚙️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/ak-123459/SnowKey.git
cd Snowkey

2️⃣ Open in Android Studio

  • Open the project in Android Studio
  • Let Gradle sync complete

3️⃣ Add Hotword Models

Place .umdl or .pmdl files into:

app/src/main/assets/

4️⃣ Setup JNI Libraries

Ensure native libs are available inside:

app/src/main/jniLibs/arm64-v8a/
app/src/main/jniLibs/armeabi-v7a/

5️⃣ Run App

  • Connect a real device (with microphone access)
  • Run the project from Android Studio

▶️ Usage

  1. Open the app
  2. Allow microphone permission
  3. Say the hotword (e.g., "snowboy")
  4. Detection logs appear in Logcat
  5. Triggered actions are handled in MainActivity.kt

🧩 Issues & Fixes

❌ Problem ✅ Solution
Snowboy repo shutdown (2020) Used archived binaries + manual integration
Compatibility issues with Android 11+ Updated Gradle & AndroidX dependencies
JNI crashes (UnsatisfiedLinkError) Fixed SnowboyVad.java & JNI wrapper
Mic permission crashes Added runtime permission handling


🚀 Future Improvements

  • [✅] Multi-hotword support
  • [✅] Integration with Voice Assistants
  • [✅] Migration to TensorFlow Lite
  • [✅] Background service implementation
  • [✅] Custom model training support

🙌 Credits

  • Snowboy by KITT.AI
    (original project, discontinued 2020)
  • Community archives for prebuilt .so binaries
  • Modern Android integration: this project

📜 License

This project is for educational & research purposes only.
Snowboy binaries remain under KITT.AI's original licensing.


👨‍💻 Author

Akash Prasad Mishra
📧 [email protected]
🔗 LinkedIn | GitHub


⭐ Star this repo if it helped you!

Found this project useful? Give it a ⭐ and help others discover it!