Automatic Speech Recognition
LiteRT-LM
LiteRT
Chinese
English
Japanese
litertlm
on-device
edge
asr
speech-recognition
streaming
audio
qwen3-asr
Instructions to use mlboydaisuke/Confucius4-R2T2-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use mlboydaisuke/Confucius4-R2T2-LiteRT with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=mlboydaisuke/Confucius4-R2T2-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use mlboydaisuke/Confucius4-R2T2-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
android/: the Android sample app (model picker, hold to talk, three clips, device check); card: the Sample app line with the Galaxy S26 numbers
5d22c56 verified Download android/app/build.gradle.kts from mlboydaisuke/Confucius4-R2T2-LiteRT: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/mlboydaisuke/Confucius4-R2T2-LiteRT/resolve/main/android/app/build.gradle.kts
- Command line
-
hf download hf://mlboydaisuke/Confucius4-R2T2-LiteRT/android/app/build.gradle.kts
-
curl -L -o build.gradle.kts https://huggingface.co/mlboydaisuke/Confucius4-R2T2-LiteRT/resolve/main/android/app/build.gradle.kts
1.33 kB
| // On-device speech recognition with three LiteRT-LM bundles (Qwen3-ASR-1.7B, Fun-ASR-Nano-2512, Confucius4-R2T2): | |
| // one Engine at a time, a new Conversation per clip, the language model and the audio encoder on the CPU. | |
| plugins { id("com.android.application") } | |
| val litertlmVersion: String = providers.gradleProperty("litertlmVersion").get() | |
| android { | |
| namespace = "com.asrlitertlm" | |
| compileSdk = 36 | |
| defaultConfig { | |
| applicationId = "com.asrlitertlm" | |
| minSdk = 31 | |
| targetSdk = 36 | |
| versionCode = 1 | |
| versionName = "1.0" | |
| ndk { abiFilters += setOf("arm64-v8a") } | |
| buildConfigField("String", "LITERTLM_VERSION", "\"$litertlmVersion\"") | |
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | |
| } | |
| buildFeatures { buildConfig = true } | |
| compileOptions { | |
| sourceCompatibility = JavaVersion.VERSION_17 | |
| targetCompatibility = JavaVersion.VERSION_17 | |
| } | |
| } | |
| dependencies { | |
| // Brings gson, kotlin-reflect and kotlinx-coroutines-android (its POM). | |
| implementation("com.google.ai.edge.litertlm:litertlm-android:$litertlmVersion") | |
| testImplementation("junit:junit:4.13.2") | |
| // Device check (app/src/androidTest): README "Device check" runs it with am instrument. | |
| androidTestImplementation("androidx.test:runner:1.6.2") | |
| androidTestImplementation("androidx.test.ext:junit:1.2.1") | |
| } | |