Desert Ant Labs

Ear

Spoken language detectionAvailable

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.

98.5%
Routed correctly
answers above the reliability threshold, 162 recordings
99
Languages
250ms
Per identification
three thirty-second windows

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.

Ear

Detect a caller's language and route the voicemail.

Ear

Sort an archive of recordings by spoken language.

EarVoz

Detect the language of a voice note, then transcribe with the right model.

Ear

Pick the dominant language of a recording to route it.

Ear

Detect the language of a voicemail or dictation before transcribing.

Ear

Gate transcription so it only runs on languages you support.

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 isReliable flag. 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.

iOS, macOS
Install
// 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")
Example - Swift
import Ear

let ear = Ear()   // downloads on first use
let detection = try await ear.identify(contentsOf: url)
detection.language      // "pt"
detection.isReliable    // true
Build with a prompt
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.
Android
Install
// build.gradle.kts (Maven Central)
implementation("ai.desertant:ear:3.1.0")
Example - Kotlin
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()
Build with a prompt
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.
Web, Node.js
Install
npm i @desert-ant-labs/ear @litertjs/core   # browser
npm i @desert-ant-labs/ear                  # Node
Example - TypeScript
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
Build with a prompt
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.

Resources