Ear listens to the start of a recording and names the spoken language out of about 100, with a confidence and the runner-up guesses. Use it to route calls and voice notes to the right team, or to pick the language for a transcription model before you pay for the whole file.
Use it
curl https://labs.greatwork.company/v1/run \
-H "Authorization: Bearer $GWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ear-1",
"input": "https://labs.greatwork.company/examples/spanish.m4a"
}'const res = await fetch("https://labs.greatwork.company/v1/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GWL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "ear-1",
"input": "https://labs.greatwork.company/examples/spanish.m4a"
}),
});
const { output, usage } = await res.json();import os, requests
res = requests.post(
"https://labs.greatwork.company/v1/run",
headers={"Authorization": f"Bearer {os.environ['GWL_API_KEY']}"},
json={
"model": "ear-1",
"input": "https://labs.greatwork.company/examples/spanish.m4a"
},
)
output = res.json()["output"]# Send a local file instead of a URL
curl https://labs.greatwork.company/v1/run \
-H "Authorization: Bearer $GWL_API_KEY" \
-F model=ear-1 \
-F input=@meeting.m4aSet GWL_API_KEY to a key from your dashboard. The bare name ear works too and follows new versions.
Options
input: An audio or video file: an https URL, a data URL, or a file in a multipart upload, up to 25 MB. Only the first 30 seconds are used.
| Name | Type | Default | What it does |
|---|---|---|---|
top_k | integer | 3 | How many candidate languages to return. |
Output
| Field | Type | Meaning |
|---|---|---|
language | string | ISO 639-1 code (en, es, ja). |
name | string | English name of the language. |
score | number | Confidence, 0 to 1. |
candidates | object[] | Top guesses with language, name, score. |
listened | number | Seconds of audio used (at most 30). |
Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}.
Examples
Spanish
{
"model": "ear-1",
"input": "/examples/spanish.m4a"
}{
"language": "es",
"name": "Spanish",
"score": 0.994,
"candidates": [
{
"language": "es",
"name": "Spanish",
"score": 0.994
},
{
"language": "en",
"name": "English",
"score": 0.0016
},
{
"language": "fr",
"name": "French",
"score": 0.0005
}
],
"listened": 8.68
}Captured on our production servers: 2216 ms, 1 file, $0.0001.
English
{
"model": "ear-1",
"input": "/examples/voice-note.m4a",
"top_k": 5
}{
"language": "en",
"name": "English",
"score": 0.9914,
"candidates": [
{
"language": "en",
"name": "English",
"score": 0.9914
},
{
"language": "hi",
"name": "Hindi",
"score": 0.001
},
{
"language": "tl",
"name": "Tagalog",
"score": 0.0009
},
{
"language": "tr",
"name": "Turkish",
"score": 0.0007
},
{
"language": "el",
"name": "Greek",
"score": 0.0006
}
],
"listened": 10.73
}Captured on our production servers: 1777 ms, 1 file, $0.0001.
Good for
- Route voicemails and calls by language
- Pick the right transcription or translation model
- Tag podcast and video libraries by language
- Spot callers who need an interpreter
Limits and caveats
- Needs speech in the first 30 seconds: trim long intros or music first.
- Closely related languages (Spanish and Galician, Norwegian and Danish) can be confused.
Pricing
$0.10 per 1,000 files. One unit per file, any length (only the first 30 seconds are analyzed). Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).
Built on
openai/whisper-base (language head), 74M parameters. License: Apache-2.0. We run it on our servers.