语音转文字
在线实时流式与离线文件转写:在线模式麦克风边说边出字,离线模式选择音频/视频文件本地转写并保留时间轴;本地 WASM 跑 VibeVoice-ASR-BitNet,模型可联网下载(官方源连不上自动改用 hf-mirror.com 镜像)、可选择文件夹(自动扫描并填好模型文件、同时作为下载落盘目标)、也可直接选择文件装载,支持 SHA-256 完整性校验与断网使用;采集链路支持 WebRTC 3A(回声消除/降噪/自动增益),可导出 TXT/SRT。
它属于「AI 本地推理」分类:用 WASM 在浏览器本地跑模型:语音转文字等能力不联网也能用,音视频不上传服务器。
- 在线实时流式:麦克风音频边录边送进识别引擎,文字随说话实时追加,适合会议记录、实时字幕。
- 离线文件转写:选择或拖入音频/视频文件,本地解码后自动语音分段、逐段转写并保留时间轴,可导出 TXT 与 SRT。
- 离线识别跑 LiteRT-LM(Google 的端侧推理运行时,@litert-lm/core):模型是 litert-community/VibeVoice-ASR-BitNet 的一个 .litertlm 包(约 1.85 GB,音频前端 / 编码器 / LM / tokenizer / 提示模板全在里面),首次下载一次,之后完全离线、音频不出浏览器。
- 模型文件先查本地缓存,命中就直接装载;未命中才下载,下载后写入浏览器缓存,之后断网可用。
- 也支持「本地装载」:直接选择磁盘上的 .litertlm 文件(可拖入或点选),全程不联网,适合内网或已经提前下好模型的场景;Chrome/Edge 上可勾选「记住这个文件」,下次打开页面授权一次即可复用。
- 联网下载时可以指定「文件夹」,模型会直接写进你选的那个文件夹(支持断点续传),之后从该目录读取,不再重复下载;目录里的模型是普通文件,能拷走、也能提前用其它工具下载好放进去。
- 官方源 huggingface.co 在国内经常连不上:页面会自动改用镜像 hf-mirror.com 重试,模型地址是固定的,不需要你填。哪个源成功过会被记住,下次优先使用;也可以用「下载源」下拉锁定单一源,或点「恢复官方优先」清掉记忆。若两个源都连不上(被墙,或被网络中间层剥掉了跨域响应头),面板会在「下载源」下方给出这两个文件的直达下载链接——点开即由浏览器直接下载,放进「文件夹」就能装载。
- 本地引擎速度(模型卡实测,桌面级 CPU):实时率约 0.24,即 10 秒音频约 2 秒转完;LM 放到 GPU 上约 0.19。30 秒以外的长音频会按 30 秒窗口切分(每个边界重置一次编码器上下文),所以实时连续识别仍建议用「浏览器云端」引擎,本地引擎更适合短音频与文件转写。
- 装载前会对每个模型文件做 SHA-256 校验:期望值优先取你手动填的哈希,其次是模型清单,再其次是官方仓库 API 与服务器 ETag。校验不通过会中止装载并给出「期望 vs 实际」的警告,你可以重新下载,也可以确认后选择忽略继续。拿不到期望值时会如实显示「未校验」,不会假装通过。
- 每条记录严格包含 who(对话人)、when(起止时间戳)、what(话术内容)三块:数据层统一规范化(缺结束时间自动补齐、空内容显式标注),渲染层每块固定三列,整列对齐。
- 瀑布流一块一行、垂直依次排列;导出同样保持三块——TXT 每行「说话人 | 00:03 - 00:07 | 内容」,SRT 带说话人,JSON 给出结构化字段。
- 采集链路可开启 WebRTC 3A:回声消除 AEC、噪声抑制 ANS、自动增益 AGC,并回读浏览器真正生效的参数。
完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。
相关关键词:语音转文字、AI 本地推理、asr、语音识别、实时流式、wasm、离线、vibevoice、降噪、3a、字幕、hf-mirror、镜像、sha256、speech to text、在线工具、免费
- 打开工具:打开「语音转文字」页面,无需注册、无需安装任何软件。
- 准备输入:准备好要处理的内容或文件:文本可直接粘贴,文件可拖入页面(本工具属于「AI 本地推理」)。
- 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
- 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
- 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
- 在线模式和离线模式有什么区别?
- 在线模式是实时流式:一边采集麦克风一边出字,可选用本地 LiteRT-LM 引擎(断网可用)或浏览器云端识别服务(需联网,音频会发给浏览器厂商)。离线模式是文件转写:选择本地音频/视频文件后本地解码、本地推理,不依赖麦克风。
- 输出的 who / when / what 三块是怎么来的?
- 模型按 JSON 输出时(Start/End/Speaker/Content),说话人与时间戳由模型直接给出;如果模型只给了纯文本,就按句切分、用本段音频区间按字数比例分配时间,说话人标记为「说话人 1」。数据层会强制补齐缺失项:没有结束时间就按起始 + 2 秒兜底,内容为空显示「(无内容)」,因此每块必然三块齐全且顺序固定为 who → when → what。
- 实时流式是怎么做到「边说边出字」的?
- 按窗口分块流式:累积到设定窗口(默认 5 秒)或检测到说话停顿时,把这一段送进引擎,结果与上一段做重叠去重后追加。它不是逐 token 流式,但停顿即可出字,延迟就是窗口大小。
- 3A 是什么,为什么有些开关没生效?
- 3A 指 AEC 回声消除、ANS 噪声抑制、AGC 自动增益,由浏览器内置的 WebRTC 音频处理模块提供,本工具通过 getUserMedia 约束开关并回读 getSettings()。是否生效取决于浏览器与设备,面板会显示实际生效值;不支持的扩展项(人声隔离、AEC 模式)会自动跳过。
- 为什么第一次离线转写很慢?
- 首次需要下载一个 .litertlm 模型包(约 1.85 GB,音频前端 / 编码器 / LM 都在里面),页面会显示实时下载进度;下载完成后写入浏览器缓存,之后显示「已缓存(可离线使用)」并不再联网。
- 离线识别用的是什么引擎?
- LiteRT-LM(Google 的端侧推理运行时,npm 包 @litert-lm/core):模型是一个自包含的 .litertlm 包,音频前端、σ-VAE 编码器、BitNet LM、tokenizer 与提示模板都在里面,音频直接作为内容项发进去,运行时自己解码并重采样到 24 kHz。wasm 由 npm run copy:litert-wasm 拷到站内自托管,不依赖 CDN。
- 浏览器跑近 2GB 模型会有问题吗?
- 有:建议 8 GB 以上内存的桌面浏览器,并保持页面在前台。选 GPU 时模型走流式装载(不会在 wasm 堆里再复制一份,峰值更低);选 CPU 时整个包会先读进 wasm 堆,内存峰值明显更高但更贴近模型卡的推荐配置(音频编码器必须留在 CPU)。
- 识别结果不准怎么办?
- 安静环境、距麦克风 20~40 厘米;开启 ANS 抑制底噪、AGC 拉齐音量;长音频分段处理;语言选择与实际语种一致时准确率更高。
Live streaming and file transcription: live mode turns microphone audio into text as you speak, file mode transcribes local audio/video with timestamps. Local WASM inference with VibeVoice-ASR-BitNet can be downloaded (auto-retried via the hf-mirror.com mirror), saved into a folder you choose, or loaded straight from local files — with SHA-256 integrity checks and no network needed afterwards; capture supports WebRTC 3A (AEC / noise suppression / AGC); export to TXT/SRT.
Belongs to “Local AI”: Run models locally in your browser with WASM: speech-to-text and more work offline, and audio/video is never uploaded.
- Live streaming: microphone audio is fed to the engine continuously and text is appended as you speak — good for meeting notes and live captions.
- File transcription: pick or drop an audio/video file; it is decoded locally, split by voice activity, transcribed segment by segment with timestamps, and exportable as TXT/SRT.
- Offline recognition runs LiteRT-LM (Google's on-device runtime, @litert-lm/core): the model is litert-community/VibeVoice-ASR-BitNet as a single .litertlm bundle (~1.85 GB) holding the audio front-end, encoder, LM, tokenizer and prompt template. One download, then fully offline — audio never leaves the browser.
- Model files are looked up in local cache first and loaded if present; only missing files are downloaded, then cached, so later sessions work offline.
- You can also load the model locally: pick the .litertlm file from disk (or drag it in) and nothing touches the network — handy for intranets or when you already have the file. On Chrome/Edge, tick "Remember" to reuse it next visit after a single permission prompt.
- When downloading you can pick a folder: models are written straight into it (resumable) and read from there afterwards, so they are never downloaded twice. The files are plain files — copy them around, or drop in models fetched with another tool.
- huggingface.co is often unreachable from mainland China: downloads are retried through the hf-mirror.com mirror automatically, and the model URL is fixed so there is nothing to fill in. The source that worked is remembered and preferred next time; you can also lock one source in the dropdown, or click "Prefer official again" to clear that memory. If both sources fail (blocked, or a middlebox strips the cross-origin headers), the panel shows direct download links under "Download source" — clicking them downloads via the browser, and dropping the files into the folder is all it takes.
- Local engine speed (from the model card, desktop CPU): real-time factor ~0.24 — a 10s clip transcribes in about 2s; ~0.19 with the LM on GPU. Audio longer than 30s is split into 30s windows (the encoder context resets at each boundary), so live continuous recognition is still better on the browser-cloud engine; the local engine suits short clips and file transcription.
- Every model file is checked with SHA-256 before loading: the expected value comes from your manual entry, then the manifest, then the official repo API or the server ETag. A mismatch stops loading and shows an expected-vs-actual warning — re-download, or confirm and continue anyway. When no expected value is available it says "not checked" rather than pretending to pass.
- Every record strictly contains who (speaker), when (start–end timestamps) and what (the utterance): normalized in the data layer (missing end time is filled in, empty content is marked explicitly) and rendered as three aligned columns per block.
- The waterfall lists one block per line, vertically; exports keep the same three fields — TXT lines as "speaker | 00:03 - 00:07 | content", SRT with speaker prefix, JSON with structured fields.
- The capture chain supports WebRTC 3A: echo cancellation (AEC), noise suppression (ANS) and auto gain control (AGC), with the actually applied parameters read back from the browser.
Free, no sign-up; everything runs locally in your browser and files are never uploaded.
Keywords: Speech to Text, Local AI, speech to text, asr, voice, streaming, wasm, offline, vibevoice, 3a, noise suppression, subtitle, hf-mirror, sha256, transcribe, online tool, free
How to use it
- Open the tool:Open the “Speech to Text” page — no sign-up and nothing to install.
- Prepare the input:Prepare the content or file to process: paste text or drop a file onto the page (this tool belongs to “Local AI”).
- Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
- Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
- Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.
FAQ
- What is the difference between live mode and file mode?
- Live mode streams: it transcribes while capturing the microphone, using either the local WASM engine (works offline) or the browser cloud service (needs network, audio is sent to the browser vendor). File mode transcribes a local audio/video file — fully local, no microphone needed.
- Where do the who / when / what fields come from?
- When the model outputs JSON (Start/End/Speaker/Content), speaker and timestamps come straight from the model; with plain text, sentences are split and the segment range is distributed by character count, with the speaker falling back to "Speaker 1". The data layer fills any gap: a missing end time becomes start + 2 s, empty content becomes "(no content)", so every block always has all three fields in the fixed order who → when → what.
- How does live streaming produce text while I speak?
- It uses chunked streaming: once the buffer reaches the window length (5 s by default) or a pause is detected, that slice is sent to the engine and the result is de-duplicated against the previous chunk before being appended. It is not token-level streaming, but text appears at every pause — latency equals the window size.
- What is 3A and why do some switches not take effect?
- 3A means AEC (echo cancellation), ANS (noise suppression) and AGC (auto gain), provided by the browser's built-in WebRTC audio module. This tool toggles them via getUserMedia constraints and reads the result back with getSettings(). Whether they apply depends on browser and device — the panel shows the effective values, and unsupported extras (voice isolation, AEC mode) are skipped automatically.
- Why is the first transcription slow?
- The first run downloads a single .litertlm bundle (~1.85 GB, holding the audio front-end, encoder and LM); the page shows live download progress. Once downloaded it is cached in the browser, after which it says "cached (offline ready)" and never goes online again.
- What engine does offline recognition use?
- LiteRT-LM, Google's on-device runtime (npm package @litert-lm/core): the model ships as a self-contained .litertlm bundle holding the audio front-end, σ-VAE encoder, BitNet LM, tokenizer and prompt template. Audio goes in as a content item and the runtime decodes and resamples it to 24 kHz itself. The wasm is self-hosted via "npm run copy:litert-wasm" — no CDN dependency.
- Any caveats running a ~2 GB model in a browser?
- Yes: use a desktop browser with 8 GB+ RAM and keep the tab in the foreground. On GPU the model is streamed (never copied into the wasm heap, so the peak is lower); on CPU the whole bundle is read into the wasm heap first — a notably higher peak, but closer to the model card's recommended setup (the audio encoder must stay on CPU).
- What if the transcript is inaccurate?
- Use a quiet room and stay 20–40 cm from the mic; enable ANS for background noise and AGC for level; split long recordings; accuracy improves when the selected language matches what is spoken.
More tools in Local AI
- Local Text-to-Speech — Synthesize Chinese and English text entirely in the browser with the Hojo-TTS family neural models (Hojo-TTS-Light and Hojo-TTS-Light-40M, switchable from a dropdown): no network, audio never leaves the device. Weights (~250MB, depending on the chosen model) download once, then it works offline; multiple built-in voices (Chinese + English).