Ear
On-device spoken language identification across 99 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 250ms. 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. You 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, 98.5% of the time.
On 162 recordings, 98.5% of the answers Ear marked reliable routed to the right transcriber; on 12 ordinary uploads and 10 rebuilt as podcasts, no confident answer was wrong.
Measured end to end through the SDK and published on the model card. Speech mixed under louder music is read correctly about 60% of the time.
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.
In a voicemail or call app, run Desert Ant's Ear on the first ~30 seconds of audio to identify the spoken language on-device, then route the message. For a very short voicemail, accumulate audio first, and treat a low-reliability answer as unknown and ask. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Install: SwiftPM desert-ant-core; Maven ai.desertant:ear:3.1.0; npm i @desert-ant-labs/ear @litertjs/core # browser. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Sort an archive of recordings by spoken language.
Build a batch tool that runs Desert Ant's Ear over a folder of recordings to tag each by spoken language, so a mixed archive sorts itself. On-device. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Install: SwiftPM desert-ant-core; Maven ai.desertant:ear:3.1.0; npm i @desert-ant-labs/ear @litertjs/core # browser. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Detect the language of a voice note, then transcribe with the right model.
Before transcribing, run Desert Ant's Ear on the first ~30 seconds to identify the spoken language on-device, then run Voz. Handle low confidence by asking the user instead of guessing. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Voz (Swift). Install and API: https://desertant.com/docs/voz/. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Pick the dominant language of a recording to route it.
Use Desert Ant's Ear on-device to identify the dominant spoken language of a recording (from its most speech-like 30-second windows) and route it to the right transcriber or team. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Install: SwiftPM desert-ant-core; Maven ai.desertant:ear:3.1.0; npm i @desert-ant-labs/ear @litertjs/core # browser. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Detect the language of a voicemail or dictation before transcribing.
Run Desert Ant's Ear on the first ~30 seconds of a voicemail or dictation on-device to identify the language, then pick the right transcriber. Ear needs about 30 seconds, so accumulate audio before deciding on very short clips. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Install: SwiftPM desert-ant-core; Maven ai.desertant:ear:3.1.0; npm i @desert-ant-labs/ear @litertjs/core # browser. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Gate transcription so it only runs on languages you support.
Use Desert Ant's Ear to detect the spoken language on-device and skip or reroute recordings in languages your transcriber does not support. Build it with the Desert Ant SDK. Ear (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/ear/. Install: SwiftPM desert-ant-core; Maven ai.desertant:ear:3.1.0; npm i @desert-ant-labs/ear @litertjs/core # browser. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
What the model does
- 99 languages, from Afrikaans to Yoruba, including the major European, Asian, and African languages.
- Picks the three thirty-second windows that sound most like speech rather than reading by position, so a music intro or a silent stretch doesn't fool it. Choosing by position finds the language 4% of the time on a five-minute recording with speech in a tenth of it.
- Returns the language, a confidence, the ranked candidates, and an
isReliableflag. The flag is false when the top two are too close to call, and false for Norwegian, Swedish, and Danish, which the model confuses with each other. - 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: "3.1.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). What it does: On-device Spoken Language Identification. SDK: Swift (iOS, macOS) 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: "3.1.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:3.1.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:3.1.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
- 99
- Input
- Three thirty-second windows of the recording; any sample rate
- Speed
- About 250ms per identification, three windows
- 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. Speech under louder music is read right about six times in ten, and Norwegian, Swedish, and Danish are confused with each other, so Ear marks those unreliable by design.
Recordings shorter than 30 seconds get one window and a less certain answer. Treat an unreliable answer as a question for the user, not a transcriber setting.
FAQ
What is Ear?
On-device spoken language identification across 99 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?
Every model is free up to 100k monthly active devices per SDK. Unlimited inference per user. Contact us for custom licenses.
How accurate or fast is Ear?
On 162 recordings, 98.5% of the answers Ear marked reliable routed to the right transcriber; on 12 ordinary uploads and 10 rebuilt as podcasts, no confident answer was wrong.