Ear
On-device spoken language identification across 102 languages, from a short stretch of audio, before transcription starts.

Detect spoken language from 30 seconds audio.
A voice note comes in and the transcriber is set to English. 30 seconds in, Ear says Portuguese, and the transcriber that runs next is the Portuguese one instead of an English one returning nonsense with confidence.
Ear doesn't listen to the whole file. Ear finds the three thirty-second stretches that sound most like speech, skips the jingle and the silence, and names the language in milliseconds. The answer comes with a confidence and a flag that says whether to trust it.
When the top two candidates are too close to separate, Ear says so. Ask the user, or fall back to a general model, instead of transcribing in the wrong language. One SDK, every platform: Swift on Apple, Kotlin on Android, JavaScript in the browser and Node. Nothing is uploaded.
The right transcriber, 99% of the time.
On 7,500 Common Voice clips in 15 languages, from speakers outside its training data, Ear picked a transcription model that handles the language 99% of the time.
Published on the model card, measured on the published weights with speakers who weren't in the training data. Latency is the median for one 30s window on a MacBook Pro with an M5 Pro, after warm-up. Phone and browser latency isn't on the card yet.
Use cases
Detect spoken language from 30 seconds audio.
Pick the right transcriber first
A transcriber pointed at the wrong language returns nonsense with confidence. In a meeting recorder or a voice-notes app, run Ear on the first 30 seconds and start the transcriber, the captions, and the translation in the language actually spoken.
Sort an archive of recordings
Run Ear over a library of voice notes, calls, or episodes in a Node script or a Mac app overnight, and every file has its language by morning. Nothing is uploaded and nothing is billed per file.
Route a call or a voicemail
In a support app or a messaging product, name the language of an incoming call or a voicemail before it reaches a person. The call lands with someone who speaks it, or with the right speech model.
Caption in the browser
A web video tool identifies the spoken language client-side, with the same SDK in the browser and in Node, and picks the caption language so the uploader never has to.
Inspiration
Ideas to build with Ear. Copy a prompt into your coding agent and go.
Detect a caller's language and route the voicemail.
Sort an archive of recordings by spoken language.
Detect the language of a voice note, then transcribe with the right model.
Pick the dominant language of a recording to route it.
Detect the language of a voicemail or dictation before transcribing.
Gate transcription so it only runs on languages you support.
What the model does
- 102 languages, from Afrikaans to Zulu, including the major European, Asian, and African languages.
- Picks the three thirty-second windows that sound most like speech, so a music intro or a silent stretch doesn't fool it. Ear ranks each window by how much its loudness varies at syllable rate. Speech rises and falls three to six times a second, music holds its notes, and silence doesn't vary at all.
- Returns the language, a confidence, the ranked candidates, and an
isReliableflag. The flag is false when the top two candidates are less than 0.25 apart in probability. The flag is always false for Norwegian, Swedish, and Danish, so send audio in those three languages to a transcription model that handles all of them. - Already-decoded audio at any sample rate works; a file URL works on Apple.
- The weights download on first use and are cached; construction does no work and starts no download.
Getting started
Add spoken language detection to your iOS or macOS, Android or web app in a few lines of code. Ear docs.
// Swift Package Manager
.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "6.0.0")
// target dependency
.product(name: "Ear", package: "desert-ant-core")
import Ear
let ear = Ear() // downloads on first use
let detection = try await ear.identify(contentsOf: url)
detection.language // "pt"
detection.isReliable // true
Add Ear from Desert Ant Labs to this Swift project (iOS, macOS, Linux, Windows). What it does: On-device Spoken Language Identification. SDK: Swift (iOS, macOS, Linux, Windows) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme // Swift Package Manager .package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "6.0.0") // target dependency .product(name: "Ear", package: "desert-ant-core") Reference: - Model page: https://desertant.com/models/ear/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
// build.gradle.kts (Maven Central)
implementation("ai.desertant:ear:6.0.0")
import ai.desertant.ear.Ear
val ear = Ear(context) // downloads on first use
val detection = ear.identify(samples, 16_000.0)
detection.language // "pt"
detection.isReliable // true
ear.close()
Add Ear from Desert Ant Labs to this Kotlin project (Android).
What it does: On-device Spoken Language Identification.
SDK:
Kotlin (Android)
Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme
// build.gradle.kts (Maven Central)
implementation("ai.desertant:ear:6.0.0")
Reference:
- Model page: https://desertant.com/models/ear/
- Full catalog and other models: https://desertant.com/llms.txt
Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
npm i @desert-ant-labs/ear @litertjs/core # browser
npm i @desert-ant-labs/ear # Node
import { Ear } from "@desert-ant-labs/ear";
const ear = await Ear.load();
const detection = await ear.identify(samples, 16000);
detection.language // "pt"
detection.isReliable // true
Add Ear from Desert Ant Labs to this JavaScript / TypeScript project (Web, Node.js). What it does: On-device Spoken Language Identification. SDK: JavaScript / TypeScript (Web, Node.js) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme npm i @desert-ant-labs/ear @litertjs/core # browser npm i @desert-ant-labs/ear # Node Reference: - Model page: https://desertant.com/models/ear/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
Specs
- Languages
- 102
- On-device size
- 5.0MB Core ML (Apple); 10.7MB LiteRT (Android, Linux, Windows, Node, the browser)
- Speed
- 7.6ms per 30s window on the Apple Neural Engine; 26.8ms with LiteRT on the CPU (MacBook Pro, M5 Pro)
- Platforms
- iOS, macOS, tvOS, visionOS (Core ML); Android, Linux, Windows (LiteRT); browser (WebAssembly and LiteRT.js); Node
Ear names the language; it doesn't transcribe. Ear is less accurate when the speakers are far from the microphone: right 90% of the time on a 5s meeting clip and 98% on 30s.
Give a room recording the full 30 seconds. Ear labels Galician as Spanish about 4% of the time.
A clip where the speakers switch languages gets one answer. For a language outside the 102, Ear picks the closest one and sometimes marks it reliable.
Treat an unreliable answer as a question for the user, not a transcriber setting.
FAQ
What is Ear?
On-device spoken language identification across 102 languages, from a short stretch of audio, before transcription starts.
Does Ear run on device?
Yes. Ear runs on the device, with no server call, so the data stays with the user.
Which platforms does Ear support?
Ear ships as a native on-device SDK for Swift, Kotlin, JavaScript / TypeScript.
How much does Ear cost?
Free up to 100k monthly active devices across models. Unlimited inference. Contact us for custom licenses.
How accurate or fast is Ear?
On 7,500 Common Voice clips in 15 languages, from speakers outside its training data, Ear picked a transcription model that handles the language 99% of the time.