Skip to content
Coder-philosopherPublic

About

Private, on-device dictation for Indian languages.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenEar

Private, on-device dictation for Indian English, Hindi, and Hinglish — a whisper.cpp-powered Android keyboard.

Tap the microphone key in OpenEar while typing in any app, speak naturally, and your words are inserted into the focused text field. Speech recognition runs entirely on your device; nothing is uploaded.

OpenEar is an independent community project. It is not affiliated with OpenAI; it uses the open Whisper models through the whisper.cpp engine.

Status

Version 0.1.0 target. Milestones:

Milestone State
1. Repository + CI skeleton (APK artifact from GitHub Actions) Implemented in-tree; CI build pending first push
2. Local transcription (JNI + model manager + test dictation) Implemented in-tree; device verification pending
3. Keyboard/IME integration (enable/select/insert) Implemented in-tree; device verification pending
4. Indian-context quality/perf benchmark Documented plan in EVAL.md; run on real hardware pending
5. Release readiness Docs complete; signing workflow optional

"Implemented in-tree" means the code is written and unit-tested here; the native build and Android behavior require the CI/device steps documented below before any milestone is "done" by the definition in idea.md.

How to install and try (no local toolchain needed)

  1. Push this repository to GitHub (Actions run on push automatically), then open Actions → android → (run) → Artifacts → OpenEar-debug-apk and download the debug APK.
  2. Install the APK on a device (Android 8.0+, arm64 or armeabi-v7a; x86_64 builds are included for emulators).
  3. Open OpenEar. Onboarding explains offline dictation.
  4. Enable OpenEar (system keyboard settings), Choose OpenEar, and grant microphone permission when prompted.
  5. Install a model on the Speech models screen (uses the network once, then transcription works offline; checksums are verified).
  6. Open any app's text field, switch to OpenEar, tap Tap to speak, then Stop to transcribe and insert.

Privacy

See PRIVACY.md. Summary: the microphone is active only during explicit dictation; recognition is local; no analytics, ads, accounts, or upload; optional history is off by default and local-only.

Repository layout

.github/workflows/android.yml   CI: build, test, lint, APK artifact, tag release
app/                            Application module (Compose UI + IME service)
  src/main/kotlin/com/openear/app/...
    audio/                      AudioRecord capture + conversion helpers
    history/                    Optional local transcript history
    keyboard/                   InputMethodService + dictation keyboard view
    model/                      Pinned catalog, downloader, checksums, repo
    privacy/                    Content-redacting logging helpers
    settings/                   DataStore-backed settings
    testdictation/              Standalone record/transcribe screen
    transcription/              Formatting, insertion guards, controller
app/src/test/                   JUnit tests (pure Kotlin logic)
whisper/                        Native library module (JNI + whisper.cpp glue)
third_party/whisper.cpp/        Vendored pinned upstream engine (MIT)
  PROVENANCE.md                 Pin, archive checksum, update procedure
EVAL.md                         Hinglish/Indian evaluation plan + phrase list
PRIVACY.md                      Privacy statement
THIRD_PARTY_NOTICES.md          Third-party licenses
LICENSE                         OpenEar MIT license

Building locally (optional)

The GitHub Actions workflow needs no local Android Studio/SDK, and is the primary way to build. If you want a local build anyway:

  • JDK 17
  • Android SDK with:
    • platforms;android-35, build-tools;35.0.0, platform-tools
    • NDK 26.3.11579264
    • CMake 3.22.1

Then:

./gradlew test          # unit tests
./gradlew :app:lintDebug
./gradlew assembleDebug # debug APK at app/build/outputs/apk/debug/
./gradlew connectedAndroidTest  # needs an emulator/device

Native code is built automatically by Gradle through CMake/NDK when you build the app — no separate native build step is required.

Models

Models are downloaded explicitly (never bundled into the APK) from a pinned, HTTPS source with SHA-256 verification:

Model Size Speed Accuracy
Whisper tiny (multilingual) ~74 MiB fastest lowest
Whisper base (multilingual) ~141 MiB medium medium (default)
Whisper small (multilingual) ~465 MiB slowest highest

You can also import a ggml model file from the document picker (Settings → Models → Import). Imported files are checksum-unverified (they may be user-provided), so only the header is sanity-checked before loading.

Known limitations (please read)

  • Some apps restrict third-party keyboards or mark fields as sensitive; Android itself may refuse keyboard input into password fields. OpenEar follows platform rules and will not attempt to bypass them.
  • Hinglish output may switch scripts inconsistently (Roman Hindi vs Devanagari); content is preserved but the script is not guaranteed.
  • Accuracy and speed depend on your device. tiny is recommended for low-memory phones; base is the default balance.
  • Dictation is a keyboard feature; asking for Speech APIs/UI overlays to work "everywhere" is out of scope by design.
  • Transcription is of what you said — OpenEar does not auto-rewrite meaning.

Development workflow

  • All CI steps are pinned (JDK, SDK, NDK, CMake, actions by SHA, Gradle wrapper validated).
  • Unit tests run on every push; the debug APK artifact is always uploaded.
  • Tag a version like v0.1.0 and CI creates a GitHub Release with the APK and a SHA-256 checksum file.
  • The vendored engine is pinned in third_party/PROVENANCE.md; update it by following the documented procedure there.

License

MIT for OpenEar itself (see LICENSE); whisper.cpp and model weights retain their own MIT terms (see THIRD_PARTY_NOTICES.md).

About

Private, on-device dictation for Indian languages.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages