{"id":50493462,"url":"https://github.com/argmaxinc/WhisperKitAndroid","last_synced_at":"2026-06-18T22:00:47.757Z","repository":{"id":258718486,"uuid":"854663682","full_name":"argmaxinc/WhisperKitAndroid","owner":"argmaxinc","description":"On-device Speech Recognition for Android","archived":false,"fork":false,"pushed_at":"2025-09-26T18:00:47.000Z","size":699,"stargazers_count":133,"open_issues_count":11,"forks_count":18,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-26T20:21:11.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/argmaxinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-09T15:09:16.000Z","updated_at":"2025-09-26T18:00:51.000Z","dependencies_parsed_at":"2024-12-11T00:25:16.918Z","dependency_job_id":"5c20f413-2f27-4672-a621-0e06d7004ba7","html_url":"https://github.com/argmaxinc/WhisperKitAndroid","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"f6137cc2285bf91742cf4b756a446fbf8e25e223"},"previous_names":["argmaxinc/whisperkitandroid"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/argmaxinc/WhisperKitAndroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxinc%2FWhisperKitAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxinc%2FWhisperKitAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxinc%2FWhisperKitAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxinc%2FWhisperKitAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/argmaxinc","download_url":"https://codeload.github.com/argmaxinc/WhisperKitAndroid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argmaxinc%2FWhisperKitAndroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T05:00:36.702Z","updated_at":"2026-06-18T22:00:47.749Z","avatar_url":"https://github.com/argmaxinc.png","language":"Kotlin","funding_links":[],"categories":["By Platform"],"sub_categories":["Android"],"readme":"\n\u003e [!IMPORTANT]\n\u003e `WhisperKitAndroid` is deprecated. `argmax-sdk-kotlin` will soon supplant this repository with an architectural redesign built on top of Google LiteRT.\n\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/argmaxinc/WhisperKit#gh-light-mode-only\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f0699c07-c29f-45b6-a9c6-f6d491b8f791\" alt=\"WhisperKit\" width=\"20%\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/argmaxinc/WhisperKit#gh-dark-mode-only\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/1be5e31c-de42-40ab-9b85-790cb911ed47\" alt=\"WhisperKit\" width=\"20%\" /\u003e\n\u003c/a\u003e\n\n# WhisperKit Android\n\n[![Tests](https://github.com/argmaxinc/whisperkitandroid/actions/workflows/pr-checks.yml/badge.svg)](https://github.com/argmaxinc/whisperkitandroid/actions/workflows/pr-checks.yml)\n[![License](https://img.shields.io/github/license/argmaxinc/whisperkitandroid?logo=github\u0026logoColor=969da4\u0026label=License\u0026labelColor=353a41\u0026color=32d058)](LICENSE.md)\n[![Maven Central](https://img.shields.io/maven-central/v/com.argmaxinc/whisperkit?logo=sonatype\u0026logoColor=969da4\u0026label=Maven%20Central\u0026labelColor=353a41\u0026color=32d058)](https://central.sonatype.com/artifact/com.argmaxinc/whisperkit)\n[![Discord](https://img.shields.io/discord/1171912382512115722?style=flat\u0026logo=discord\u0026logoColor=969da4\u0026label=Discord\u0026labelColor=353a41\u0026color=32d058\u0026link=https%3A%2F%2Fdiscord.gg%2FG5F5GZGecC)](https://discord.gg/G5F5GZGecC)\n\n\u003c/div\u003e\n\nWhisperKit Android brings Foundation Models On Device for Automatic Speech Recognition. It extends the performance and feature set of [WhisperKit](https://github.com/argmaxinc/WhisperKit) from Apple platforms to Android and Linux.  The current feature set is a subset of the iOS counterpart,\nbut we are continuing to invest in Android and now welcome contributions from the community.\n\n[[Example App]](https://play.google.com/store/apps/details?id=com.argmaxinc.whisperax) [[Blog Post]](https://takeargmax.com/blog/android) [[Python Tools Repo]](https://github.com/argmaxinc/whisperkittools)\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Build From Source](#build-from-source)\n- [Contributing](#contributing)\n- [License](#license)\n- [Citation](#citation)\n\n# Getting Started\n\nWhisperKit API is currently experimental and requires explicit opt-in using `@OptIn(ExperimentalWhisperKit::class)`. This indicates that the API may change in future releases. Use with caution in production code.\n\nTo use WhisperKit in your Android app, you need to:\n\n1. Add the following dependencies to your app's `build.gradle.kts`:\n\n```kotlin\ndependencies {\n   // 1. WhisperKit SDK\n   implementation(\"com.argmaxinc:whisperkit:0.3.3\")  // Check badge above for latest version\n\n   // 2. QNN dependencies for hardware acceleration\n   implementation(\"com.qualcomm.qnn:qnn-runtime:2.34.0\")\n   implementation(\"com.qualcomm.qnn:qnn-litert-delegate:2.34.0\")\n}\n```\n\n2. Configure JNI library packaging in your app's `build.gradle.kts`:\n\n```kotlin\nandroid {\n   // ...\n   packaging {\n      jniLibs {\n         useLegacyPackaging = true\n      }\n   }\n}\n```\n\n3. Use WhisperKit in your code:\n\n```kotlin\n@OptIn(ExperimentalWhisperKit::class)\nclass YourActivity : AppCompatActivity() {\n   private lateinit var whisperKit: WhisperKit\n\n   override fun onCreate(savedInstanceState: Bundle?) {\n      super.onCreate(savedInstanceState)\n\n      // Initialize WhisperKit\n      // Note: Always use applicationContext to avoid memory leaks and ensure proper lifecycle management\n      whisperKit = WhisperKit.Builder()\n         .setModel(WhisperKit.OPENAI_TINY_EN)\n         .setApplicationContext(applicationContext)\n         .setCallback { what, result -\u003e\n            // Handle transcription output\n            when (what) {\n               WhisperKit.TextOutputCallback.MSG_INIT -\u003e {\n                  // Model initialized successfully\n               }\n               WhisperKit.TextOutputCallback.MSG_TEXT_OUT -\u003e {\n                  // New transcription available\n                  val fullText = result.text\n                  val segments = result.segments\n                  // Process the transcribed text as it becomes available\n                  // This callback will be called multiple times as more audio is processed\n                  segments.forEach { segment -\u003e\n                     // Process each segment\n                     val segmentText = segment.text\n                  }\n               }\n               WhisperKit.TextOutputCallback.MSG_CLOSE -\u003e {\n                  // Cleanup complete\n               }\n            }\n         }\n         .build()\n\n      // Load the model\n      lifecycleScope.launch {\n         whisperKit.loadModel().collect { progress -\u003e\n            // Handle download progress\n         }\n\n         // Initialize with audio parameters\n         whisperKit.init(frequency = 16000, channels = 1, duration = 0)\n\n         // Transcribe audio data in chunks\n         // You can call transcribe() multiple times with different chunks of audio data\n         // Results will be delivered through the callback as they become available\n         val audioChunk1: ByteArray = // First chunk of audio data\n            whisperKit.transcribe(audioChunk1)\n\n         val audioChunk2: ByteArray = // Second chunk of audio data\n            whisperKit.transcribe(audioChunk2)\n\n         // Continue processing more chunks as needed...\n      }\n   }\n\n   override fun onDestroy() {\n      super.onDestroy()\n      whisperKit.deinitialize()\n   }\n}\n```\n\nNote: The WhisperKit API is currently experimental and may change in future releases. Make sure to handle the `@OptIn(ExperimentalWhisperKit::class)` annotation appropriately in your code.\n\n# Build From Source\n\n\u003cdetails\u003e\n  \u003csummary\u003e (Click to expand) \u003c/summary\u003e\n\nThe following setup was tested on macOS 15.1.\n\n## Common Setup Steps\n\nThese steps are required for both Android app development and CLI:\n\n1. Install required build tools:\n\n```bash\nmake setup\n```\n\n2. Build development environment in Docker with all development tools:\n\n```bash\nmake env\n```\n\nThe first time running `make env` command will take several minutes. After the Docker image builds, the next time running `make env` will execute inside the Docker container right away.\n\nIf you need to rebuild the Docker image:\n```bash\nmake rebuild-env\n```\n\n### Android App Development Path\n\n1. Build and enter the Docker environment:\n\n```bash\nmake env\n```\n\n2. Build the required native libraries:\n\n```bash\nmake build jni\n```\n\n3. Open the Android project in Android Studio:\n   - Open the root project in Android Studio\n   - Navigate to `android/examples/WhisperAX`\n   - Build and run the app\n\n### CLI Development Path\n\n1. Build and enter the Docker environment:\n\n```bash\nmake env\n```\n\n2. Build the CLI app:\n\n```bash\nmake build [linux | qnn | gpu]\n```\n\n- `linux`: CPU-only build for Linux\n- `qnn`: Android build with Qualcomm NPU support\n- `gpu`: Android build with GPU support\n\n3. Push dependencies to Android device (skip for Linux):\n\n```bash\nmake adb-push\n```\n\n4. Run the CLI app:\n\nFor Android:\n\n```bash\nadb shell\ncd /sdcard/argmax/tflite\nexport PATH=/data/local/tmp/bin:$PATH\nexport LD_LIBRARY_PATH=/data/local/tmp/lib\nwhisperkit-cli transcribe --model-path /path/to/openai_whisper-base --audio-path /path/to/inputs/jfk_441khz.m4a\n```\n\nFor Linux:\n\n```bash\n./build/linux/whisperkit-cli transcribe --model-path /path/to/my/whisper_model --audio-path /path/to/my/audio_file.m4a --report --report-path /path/to/dump/report.json\n```\n\nFor all options, run `whisperkit-cli --help`\n\n5. Clean build files when needed:\n\n```bash\nmake clean [all]\n```\nWith `all` option, it will conduct deep clean including open source components.\n\n\u003c/details\u003e\n\n# Contributing\n\nWe are actively developing the project and welcome contributions from the community.\n\n## Development Setup\n\n### Installing clang-format\n\nThe project uses clang-format 14 for C++ code formatting. You'll need to install it based on your operating system:\n\n#### macOS\n```bash\n# Install LLVM 14\nbrew install llvm@14\n\n# Create symlink for clang-format\nsudo ln -sf /opt/homebrew/opt/llvm@14/bin/clang-format /opt/homebrew/bin/clang-format\n```\n\n#### Linux (Ubuntu/Debian)\n```bash\nsudo apt update\nsudo apt install -y clang-format-14\nsudo ln -sf /usr/bin/clang-format-14 /usr/local/bin/clang-format\n```\n\nVerify the installation:\n```bash\nclang-format --version\n```\n\nTo check C++ code formatting:\n```bash\n./gradlew spotlessCppCheck\n```\n\n## Git Hooks\n\nThis project uses Git hooks to maintain code quality. These hooks help ensure consistent code formatting and quality standards.\n\n### Setup\n\nTo use the Git hooks, run the following command in your repository root:\n\n```bash\ngit config core.hooksPath .githooks\n```\n\n### Available Hooks\n\n#### pre-commit\n- Runs `spotlessApply` to automatically fix code formatting issues\n- If formatting fixes are applied, they are automatically staged\n- The commit will be blocked if `spotlessApply` fails\n\n### Troubleshooting\n\nIf you need to bypass the hooks temporarily (not recommended), you can use:\n```bash\ngit commit --no-verify\n```\n\n# License\n\n- We release WhisperKit Android under [MIT License](LICENSE).\n- FFmpeg open-source (audio decompressing) is released under [LGPL](https://github.com/FFmpeg/FFmpeg/blob/master/LICENSE.md)\n- OpenAI Whisper model open-source checkpoints were released under the [MIT License](https://github.com/openai/whisper/blob/main/LICENSE).\n- Qualcomm AI Hub `.tflite` models and QNN libraries for NPU deployment are released under the [Qualcomm AI Model \u0026 Software License](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/Qualcomm+AI+Hub+Proprietary+License.pdf).\n\n# Citation\n\nIf you use WhisperKit for something cool or just find it useful, please drop us a note at [info@argmaxinc.com](mailto:info@argmaxinc.com)!\n\nIf you are looking for managed enterprise deployment with Argmax, please drop us a note at [info+sales@argmaxinc.com](mailto:info+sales@argmaxinc.com).\n\nIf you use WhisperKit for academic work, here is the BibTeX:\n\n```bibtex\n@misc{whisperkit-argmax,\n   title = {WhisperKit},\n   author = {Argmax, Inc.},\n   year = {2024},\n   URL = {https://github.com/argmaxinc/WhisperKitAndroid}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaxinc%2FWhisperKitAndroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargmaxinc%2FWhisperKitAndroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaxinc%2FWhisperKitAndroid/lists"}