Beacon · by Hoverfly

Know the language
of every message.

Detect the language and script of any text, even a two-word chat message or Hinglish, in under a tenth of a millisecond. It runs on the device (Android, iOS, desktop or the web) and sends nothing to a server.

Get started View source

Free up to 10k monthly active devices · No API key · On Maven Central · Android, iOS, desktop, web

beacon.candidates(text)
Kal milte hain bhai
Detected
hin_LatnHindi (romanised)
hin_LatnHindi (romanised)
50%
urd_LatnUrdu (romanised)
44%
tam_LatnTamil (romanised)
1%
Live demo

Try the real model, right here

This is the actual Beacon library, compiled to WebAssembly and running in your browser. Type a few words in any language or script. Your text never leaves this page.

Loading the model (~9 MB)…
Updates as you type
Why Beacon

Built for chat, not just clean sentences

Most language detectors are built for long, tidy text. Beacon is built for short messages, mixed scripts and Indian languages typed in Latin letters.

Romanised Indic

Tells Hinglish, Tanglish, Banglish and 9 more romanised South Asian languages apart, at 93% accuracy. Other detectors score close to 0% here.

No dependencies

Pure Kotlin inference. There is no ML Kit, TFLite or native code, and no Google Play services requirement. It adds about 8.5 MB to your APK.

Private & offline

The model ships inside the library on every platform. It makes no network calls, needs no permissions and sends no telemetry, so user text never leaves the phone.

Fast

About 0.08 ms per text on an Android emulator. That is fast enough to re-detect on every keystroke.

211
Labels
language + script pairs
88%
Chat accuracy
vs 71% for ML Kit
~0.08ms
Per text
on device, once warm
~8.5MB
On-device
inside the library
On device

Same language, any script

Real output from the sample app on an Android emulator. These are not mockups.

Beacon detecting Hindi (romanised) for Kal milte hain bhai

Hinglish

"Kal milte hain bhai" → hin_Latn, with Urdu (romanised) a close second

Beacon detecting Tamil (romanised) for Enna panra da

Tanglish

"Enna panra da" → tam_Latn, 98%

Beacon detecting Tamil script

Tamil script

"நான் வீட்டுக்கு போறேன்" → tam_Taml, 94%

Same library on every platform

The Kotlin Multiplatform sample app, built from the published artifacts, gives the same result on Android, iOS, desktop and the web.

Beacon sample on Android

Android

Kal milte hain bhai → hin_Latn 50%

Beacon sample on iOS

iOS

Kal milte hain bhai → hin_Latn 50%

Beacon sample on Desktop (JVM)

Desktop (JVM)

Kal milte hain bhai → hin_Latn 50%

Beacon sample on Web (Wasm)

Web (Wasm)

Kal milte hain bhai → hin_Latn 50%

Install

Add it to your build

One line in your Gradle file, from Maven Central. Works in commonMain for Android, iOS, macOS, JVM desktop, JavaScript and WebAssembly. No API key, no account.

Maven Central live
// build.gradle.kts: commonMain, or any platform source set
dependencies {
    implementation("io.github.rajumark:beacon:2.0.0")
}

// Gradle picks the right artifact per platform:
// beacon-android · beacon-jvm · beacon-iosarm64 · beacon-iossimulatorarm64
// beacon-macosarm64 · beacon-js · beacon-wasm-js
Build with a prompt
Add Beacon from rajumark to this Kotlin Multiplatform or Android project.

What it does: on-device language detection for 211 languages and scripts, including romanised Indian languages (Hinglish, Tanglish). ~8.5 MB, no dependencies, no network.

Install (Maven Central, no extra repository):
  build.gradle.kts (commonMain or any source set): implementation("io.github.rajumark:beacon:2.0.0")
  Platforms: Android, iOS, macOS, JVM desktop, JavaScript, WebAssembly

Usage:
  val beacon = Beacon()          // off the main thread, keep one instance
  val r = beacon.detect("Kal milte hain bhai")
  r.label   // "hin_Latn"

Repo: https://github.com/rajumark/beacon#readme
Add the dependency, then follow the README for the exact API and current version.
Usage

Two lines to a language

Load once and reuse the instance. detect() is thread-safe.

Kotlin
val beacon = Beacon()

val r = beacon.detect("Kal milte hain bhai")
r.label      // "hin_Latn"
r.name       // "Hindi (romanised)"
r.isReliable // true

beacon.close()
Java
try (Beacon beacon = new Beacon()) {
    DetectedLanguage r =
        beacon.detect("Kal milte hain bhai");
    String label = r.getLabel();
}
Use cases

Where Beacon fits

Anywhere your app needs to know which language it is looking at before it does something with the text.

Keyboards

Switch the suggestion dictionary or layout to the language the user is actually typing.

"Enna panra da" → tam_Latn

Translation

Pick the source language automatically, even for romanised text that looks like English.

"Nos vemos mañana" → spa_Latn

Text-to-speech

Choose the right TTS voice before reading a message aloud.

"ఎలా ఉన్నారు?" → tel_Telu

Support routing

Send a ticket to an agent who speaks the customer's language, before anyone reads it.

"Aap kaise ho" → hin_Latn

Content filtering

Filter feeds, comments or search results by language on the device.

"Je suis en retard" → fra_Latn

Model routing

Send Hindi and Hinglish to different models, or turn on smart replies only for languages you support.

"मैं घर जा रहा हूँ" → hin_Deva
App ideas

20 apps you could build with Beacon

Real problems Beacon solves today. Pick one and ship it.

Smart keyboard · Switch the dictionary the moment a user flips from English to Hinglish mid-sentence.

Auto-translate chat · Translate only the messages that aren't in the reader's language and leave the rest alone.

Read-aloud app · Pick the right text-to-speech voice for each message before speaking it.

Support ticket router · Assign each ticket to an agent who speaks the customer's language, before anyone reads it.

Chatbot that answers in kind · Reply in the same language and script the user typed in, Tanglish included.

Multilingual search · Send "sasta phone chahiye" to the Hindi analyzer, not the English one.

Regional news feed · Show each user only the articles and comments in languages they actually read.

Moderation pre-check · Route each message to the moderation model trained for its language.

Spell checker · Load the right spell-check dictionary per sentence in bilingual text.

Font & direction picker · Choose the right font and RTL/LTR layout for Urdu, Arabic or Tamil before rendering.

Smart reply gating · Show reply chips only when the message is in a language your reply model supports.

Language-learning app · Check the learner answered in Spanish, not English, before grading the answer.

Review sorter · Group app-store or product reviews by language for regional support teams.

Private language analytics · Learn which languages your users type in without sending a single message to a server.

Notes auto-tagging · Tag notes by language so bilingual users can filter Hindi notes from English ones.

Subtitle checker · Verify a subtitle track is really in the language its label claims.

Form validation · Warn when a "Name in Hindi" field is filled with English letters.

Notification language · Send push notifications in the language each user chats in, not just the phone locale.

Civic complaint app · Route citizen complaints in any of the 22 Indian languages to the right state office.

Dataset cleaner · Filter user-generated text by language on the device before it is uploaded or labelled.

Accuracy

Best where others struggle

Beacon compared with the best of fastText, OpenLID, MediaPipe, CLD2, langid.py, Lingua and ML Kit on each test.

TestBeaconBest other detector
FLORES-200, 64 shared languages98.5%OpenLID-201 98.9% (158 MB)
Short text, ≤ 5 words93.8%Lingua 89.0%
Chat messages (188 hand-written)88.3%MediaPipe 71.3%
Romanised Indic (human + real chat)93.0%MediaPipe 7.5%, others ~0%

Known limits: single words are hard (65%). Close pairs stay close: Bosnian/Croatian/Serbian, Indonesian/Malay, and romanised Hindi vs romanised Urdu, which are the same spoken language.

Reference

API at a glance

MemberDescription
Beacon()Loads the bundled model. Implements AutoCloseable.
detect(text)The most likely language, or DetectedLanguage.UNDETERMINED when the text has no letters.
candidates(text, limit = 3)The most likely languages, best first.
supportedLabelsAll 211 labels, such as hin_Latn or tam_Taml.
DetectedLanguage(label, language, script, name, confidence)One result, with ISO 639-3 language and ISO 15924 script codes and isReliable.
Pricing & license

Free until you're big.

No API key, no sign-up, no license file. Add Beacon to your project and ship. It stays free until your product passes 10,000 monthly active devices, and there's never a limit on how often each device runs it.

Commercial
Let's talk

For products above 10,000 monthly active devices on any platform.

  • One license per product, per model
  • Pricing that fits your scale
  • Direct support from the people who built it
  • Early access to model updates
Custom models
Built for you

A small, fast on-device model trained for your language, domain or task.

  • Moderation, classification, detection, replies and more
  • Tuned on your use case and your users' languages
  • Shipped as a plain Kotlin library, like Beacon
  • Private: your model runs on your users' devices

How devices are counted

A monthly active device is a phone, tablet or other device that runs Beacon at least once in a calendar month.

The 10,000 limit applies separately to each product, each platform (Android, iOS, web…) and each Hoverfly model. Crossed it? You have 30 days to get a commercial license.

What the license does not allow

  • Selling or redistributing Beacon or its model on its own, or inside another SDK
  • Extracting, modifying or fine-tuning the model weights
  • Using the model or its outputs to train or distill another model
  • Reverse engineering the model or its file format
  • Offering it as a hosted API for others

Questions about licensing? Email raju348636@gmail.com or call / WhatsApp +91 63533 21951. Full terms: Hoverfly Community License.

FAQ

Questions

What is Beacon?

A Kotlin Multiplatform library (Android, iOS, macOS, JVM desktop, JavaScript, WebAssembly) that returns the language and script of a piece of text, from a list of 211 labels. That list includes all 22 scheduled Indian languages and 12 romanised South Asian languages.

What does "hin_Latn" mean?

Language plus script: Hindi (ISO 639-3 hin) written in Latin letters (ISO 15924 Latn). The same language in Devanagari is hin_Deva.

Does it run on device?

Yes. Inference runs entirely on the device in plain Kotlin. It makes no server calls, needs no network permission and sends no telemetry.

How does it compare to ML Kit Language ID?

On an Android emulator it scored 88.3% vs 71.3% on chat, 93.2% vs 84.0% on short text, and 92.1% vs 6.9% on romanised Indic. It also needs no Google Play services.

Is the Kotlin port exact?

Normalization, feature ids and predicted labels match the Python reference on all 958 test vectors, both on the JVM and on an Android device.

How much does Beacon cost?

Nothing for products with up to 10,000 monthly active devices per platform, including commercial apps. There is no API key or account, and no limit on how often it runs. Above that, a commercial license is needed. See Pricing.

What happens when my app passes 10,000 monthly active devices?

Nothing breaks: Beacon keeps working and never checks in with a server. You have 30 days to get a commercial license. Email raju348636@gmail.com or call / WhatsApp +91 63533 21951.

Can you build a model for my app?

Yes. Hoverfly trains custom on-device models for your language, domain or task and ships them as a small library like this one. Get in touch on the same email or number.

A note from the creator

Built by a developer, for developers.

Every model here started as a problem I hit in my own apps. I made them small, private and free to start, so you can spend your time on the part your users will love.

Raju ShingadiyaAndroid developer · creator of Hoverfly
Meet the maker
The Hoverfly family

Beacon is one of eight.

Eight small on-device models, one job each. Same install, same free tier, and the same promise: nothing leaves the device.

MojiEmoji suggestionsThe right emoji for any message, in 22 languages.
BeaconLanguage detectionLanguage and script of any text, Hinglish included.You're here
CommaPunctuationTurns voice-typed text into readable sentences. ComebackSmart repliesThree tap-to-send replies for every message. EmotionEmotion detection28 emotions and an overall mood, per message. GatekeeperToxicity detectionCatches abuse and threats in Indian chat. HideoutPersonal info hidingHides phones, UPI, Aadhaar and more. ChalkDoodle recognitionGuesses 345 things from pen strokes, live.
View all models Hoverfly home