
凭 30 秒音频识别语种。
一条语音留言进来,转写器被设成了英语。30 秒后,Ear 说这是葡萄牙语,于是接着运行的是葡萄牙语转写器,而不是一个自信地返回一堆胡话的英语转写器。
Ear 不会听完整个文件。Ear 找出听起来最像语音的三个三十秒片段,跳过片头曲和静音,在毫秒级的时间内说出语言。答案附带一个把握度,以及一个标记,告诉你是否该信任它。
当前两个候选太接近、无法区分时,Ear 会如实说明。这时可以询问用户,或改用一个通用模型,而不是用错误的语言去转写。一个 SDK,覆盖每个平台:Apple 上用 Swift,Android 上用 Kotlin,浏览器和 Node 里用 JavaScript。什么都不上传。
99% 的情况选对转写器。
在 15 种语言、7,500 段 Common Voice 录音上(说话人都不在训练数据里),Ear 有 99% 的情况选中了能处理该语言的转写模型。
公布在模型卡上,基于已发布的权重、用训练数据之外的说话人测得。延迟是在搭载 M5 Pro 的 MacBook Pro 上预热之后,单个 30 秒窗口的中位数。手机和浏览器上的延迟尚未列入模型卡。
应用场景
凭 30 秒音频识别语种。.
先选对转写器
指向错误语言的转写器,会自信地返回一堆胡话。在会议记录器或语音笔记应用里,对前 30 秒运行 Ear,再用真正所说的语言启动转写、字幕和翻译。
整理一批录音存档
在 Node 脚本或 Mac 应用里,通宵把一库语音笔记、通话或节目过一遍 Ear,到早上每个文件都标好了语言。什么都不上传,也不按文件计费。
分流一通电话或一条语音信箱
在客服应用或即时通讯产品里,在一通来电或一条语音信箱到达真人之前,先说出它的语言。这通电话就会落到会说这门语言的人那里,或落到对的语音模型上。
在浏览器里做字幕
一款网页视频工具在客户端识别所说的语言,浏览器和 Node 里用同一个 SDK,并据此选好字幕语言,上传者从此不用自己选。
灵感
用 Ear 构建的点子。把提示词复制到你的编码 agent 里就能开始。
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.
模型能做什么
- 102 种语言,从南非荷兰语到祖鲁语,涵盖主要的欧洲、亚洲和非洲语言。
- 挑选听起来最像语音的三个三十秒窗口,因此一段音乐片头或一段静音骗不了它。Ear 按响度随音节节奏起伏的程度,给每个窗口排序。语音的响度每秒起落三到六次,音乐的音符会延续下去,静音则毫无起伏。
- 返回语言、一个把握度、排好序的候选,以及一个
isReliable标记。排名前两位的候选概率相差不到 0.25 时,该标记为 false。对挪威语、瑞典语和丹麦语,该标记始终为 false,因此请把这三种语言的音频交给一个能同时处理它们的转写模型。 - 任意采样率、已解码的音频都可用;在 Apple 上文件 URL 也可用。
- 权重在首次使用时下载并缓存;构造时不做任何工作,也不发起任何下载。
快速上手
只需几行代码,即可为你的 iOS or macOS, Android or web 应用加上 口语语种检测。 Ear 文档.
// 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: Ear:设备端口语语种识别. 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: Ear:设备端口语语种识别.
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: Ear:设备端口语语种识别. 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.
规格
- 语言
- 102
- 设备端体积
- 5.0 MB Core ML(Apple);10.7 MB LiteRT(Android、Linux、Windows、Node、浏览器)
- 速度
- 在 Apple 神经网络引擎上每个 30 秒窗口 7.6 毫秒;在 CPU 上用 LiteRT 为 26.8 毫秒(MacBook Pro,M5 Pro)
- 平台
- iOS、macOS、tvOS、visionOS(Core ML);Android、Linux、Windows(LiteRT);浏览器(WebAssembly 和 LiteRT.js);Node
Ear 说出语言,但不做转写。说话人离麦克风较远时,Ear 的准确度会下降:一段 5 秒的会议录音,正确率为 90%,30 秒时为 98%。在房间里录的音频,请给足 30 秒。Ear 大约有 4% 的情况会把加利西亚语认成西班牙语。说话人中途切换语言的片段只会得到一个答案。对于这 102 种以外的语言,Ear 会挑出最接近的一种,有时还会把它标为可靠。请把不可靠的答案当作一个要问用户的问题,而不是一个转写器设置。
常见问题
Ear 是什么?
设备端口语语种识别,在转写开始前,凭一小段音频判定所说语言,覆盖 102 种语言。
Ear 在设备上运行吗?
是的。Ear 在设备上运行,不调用任何服务器,因此数据始终留在用户手中。
Ear 支持哪些平台?
Ear 以面向 Swift, Kotlin, JavaScript / TypeScript 的原生设备端 SDK 形式提供。
Ear 的价格是多少?
所有模型合计,免费支持最多 10 万台月活跃设备。推理次数不限。 如需定制授权,请联系我们。
Ear 的准确度和速度如何?
在 15 种语言、7,500 段 Common Voice 录音上(说话人都不在训练数据里),Ear 有 99% 的情况选中了能处理该语言的转写模型。