语音转文字
在线实时流式与离线文件转写:在线模式麦克风边说边出字,离线模式选择音频/视频文件本地转写并保留时间轴;本地 WASM 跑 VibeVoice-ASR-BitNet,模型可联网下载(官方源连不上自动改用 hf-mirror.com 镜像)、可指定保存目录、也可直接装载本地文件,支持 SHA-256 完整性校验与断网使用;采集链路支持 WebRTC 3A(回声消除/降噪/自动增益),可导出 TXT/SRT。
它属于「AI 本地推理」分类:用 WASM 在浏览器本地跑模型:语音转文字等能力不联网也能用,音视频不上传服务器。
- 在线实时流式:麦克风音频边录边送进识别引擎,文字随说话实时追加,适合会议记录、实时字幕。
- 离线文件转写:选择或拖入音频/视频文件,本地解码后自动语音分段、逐段转写并保留时间轴,可导出 TXT 与 SRT。
- 离线识别跑 VibeASR.cpp(VibeASR.cpp + llama.cpp 编译的 WASM):VAE 音频编码器 + LM 解码器两个 GGUF 模型,首次下载约 1.6 GB,之后完全离线、音频不出浏览器。
- 模型文件先查本地缓存,命中就直接装载;未命中才下载,下载后写入浏览器缓存,之后断网可用。
- 也支持「本地装载」:直接选择磁盘上的两个 GGUF 文件(可拖入或点选),全程不联网,适合内网或已经提前下好模型的场景;Chrome/Edge 上可勾选「记住这批文件」,下次打开页面授权一次即可复用。
- 联网下载时可以指定「保存目录」,模型会直接写进你选的那个文件夹(支持断点续传),之后从该目录读取,不再重复下载;目录里的模型是普通文件,能拷走、也能提前用其它工具下载好放进去。
- 官方源 huggingface.co 在国内经常连不上:页面会自动改用镜像 hf-mirror.com 重试,模型地址是固定的,不需要你填。哪个源成功过会被记住,下次优先使用;也可以用「下载源」下拉锁定单一源,或点「恢复官方优先」清掉记忆。若两个源都连不上(被墙,或被网络中间层剥掉了跨域响应头),面板会在「下载源」下方给出这两个文件的直达下载链接——点开即由浏览器直接下载,放进「保存目录」就能装载。
- 本地引擎实测速度:13.5 秒语音约需 187 秒(约 14× 实时,2 秒分块 + 单线程标量),装载 1.6GB 权重只要 2 秒级。所以实时连续识别请用「浏览器云端」引擎;本地引擎适合短音频与文件转写,长时间录音要有等待预期。开启 COOP/COEP 后可切到多线程版提速。
- 装载前会对每个模型文件做 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 本地推理」)。
- 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
- 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
- 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
- 在线模式和离线模式有什么区别?
- 在线模式是实时流式:一边采集麦克风一边出字,可选用本地 WASM 引擎(断网可用)或浏览器云端识别服务(需联网,音频会发给浏览器厂商)。离线模式是文件转写:选择本地音频/视频文件后本地解码、本地推理,不依赖麦克风。
- 输出的 who / when / what 三块是怎么来的?
- 模型按 JSON 输出时(Start/End/Speaker/Content),说话人与时间戳由模型直接给出;如果模型只给了纯文本,就按句切分、用本段音频区间按字数比例分配时间,说话人标记为「说话人 1」。数据层会强制补齐缺失项:没有结束时间就按起始 + 2 秒兜底,内容为空显示「(无内容)」,因此每块必然三块齐全且顺序固定为 who → when → what。
- 实时流式是怎么做到「边说边出字」的?
- 按窗口分块流式:累积到设定窗口(默认 5 秒)或检测到说话停顿时,把这一段送进引擎,结果与上一段做重叠去重后追加。它不是逐 token 流式,但停顿即可出字,延迟就是窗口大小。
- 3A 是什么,为什么有些开关没生效?
- 3A 指 AEC 回声消除、ANS 噪声抑制、AGC 自动增益,由浏览器内置的 WebRTC 音频处理模块提供,本工具通过 getUserMedia 约束开关并回读 getSettings()。是否生效取决于浏览器与设备,面板会显示实际生效值;不支持的扩展项(人声隔离、AEC 模式)会自动跳过。
- 为什么第一次离线转写很慢?
- 首次需要下载两个 GGUF 模型(VAE 编码器约 0.65 GB、LM 解码器约 0.92 GB,共约 1.6 GB),页面会显示实时下载进度;下载完成后写入浏览器缓存,之后显示「已缓存(可离线使用)」并不再联网。
- 离线识别用的是什么引擎?
- 微软官方的 VibeASR.cpp(依赖 llama.cpp)用 Emscripten 编译成 WASM,仓库里 wasm/ 目录是封装代码,执行 npm run build:wasm 可自行构建;推理跑在 Web Worker 中,不会卡住页面。
- 浏览器跑 1.6GB 模型会有问题吗?
- 模型权重会进入 WASM 内存,建议 8 GB 以上内存的桌面浏览器使用,并保持页面在前台;首次装载需要几十秒,装载完成后每次转写只处理音频本身。
- 识别结果不准怎么办?
- 安静环境、距麦克风 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 VibeASR.cpp compiled to WASM (with llama.cpp): a VAE audio encoder plus an LM decoder, two GGUF files about 1.6 GB in total. After the first download it works fully offline and 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 models locally: pick the two GGUF files from disk (or drag them in) and nothing touches the network — handy for intranets or when you already have the files. On Chrome/Edge, tick "Remember these files" to reuse them next visit after a single permission prompt.
- When downloading you can pick a save 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 save folder is all it takes.
- Measured locally: 13.5s of speech takes ~187s to transcribe (~14× real-time, 2-second chunks, single-threaded scalar), while loading the 1.6GB weights takes only seconds. So use the browser-cloud engine for live recognition; the local engine suits short clips and file transcription, and long recordings need patience. Enabling COOP/COEP switches it to the multi-threaded build for a speed-up.
- 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 two GGUF models (VAE encoder ~0.65 GB and LM decoder ~0.92 GB, ~1.6 GB total) with live progress; they are then cached in the browser, after which the panel shows "cached (works offline)" and no network is needed.
- What engine does offline recognition use?
- Microsoft's VibeASR.cpp (built on llama.cpp) is compiled to WASM with Emscripten. The wasm/ directory here holds the wrapper; run npm run build:wasm to build it yourself. Inference runs in a Web Worker so the page stays responsive.
- Any caveats running a 1.6 GB model in a browser?
- Weights live in WASM memory: use a desktop browser with 8 GB+ RAM and keep the tab in the foreground. First load takes tens of seconds; afterwards each transcription only processes the audio.
- 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).