本地语音合成
浏览器本地运行神经网络语音合成,不联网、音频不出设备:默认后端用 Hojo-TTS 系列(Hojo-TTS-Light 与 Hojo-TTS-Light-40M,可下拉切换,权重约 250MB,15 种中英文音色),也可切到 litert 后端用 LiteRT 跑 Qwen3-TTS 的 .tflite 图(Talker + MTP + Codec,固定 CPU/WASM,权重约 1.8GB,单一 demo 音色)。支持联网下载(下载源按官方 huggingface.co → 镜像 hf-mirror.com → ModelScope 魔搭国内源依次尝试,连不上自动换下一个;实测国内实际走 ModelScope,文件与官方仓库逐字节一致、SHA-256 同样通过)、选择文件夹落盘、或直接「选择文件」指定已下好的权重(指定后完全不联网,内网可用),下载过程显示总量/百分比、实时速度、预计剩余时间与当前文件,断线或 5xx 时自动重连(最多 5 次、指数退避)并从断点续传,带 SHA-256 校验。
它属于「AI 本地推理」分类:用 WASM 在浏览器本地跑模型:语音合成、本地对话(含酒馆玩法)可完全离线,音视频与聊天内容不上传服务器;语音转文字的离线引擎默认用 Whisper(int8 权重约 43/76 MB),可选的 LiteRT-LM 档位受上游运行时限制,详见工具页说明。
- 下载时能看到完整信息:总进度条、已下载 / 总量与百分比、实时速度、预计剩余时间、当前是第几个文件、这一份来自哪里(本地文件 / 浏览器缓存 / 断点续传 / 所选目录)。
- **断线自动重连**:网络中断、连接被重置或源返回 5xx 时会自动重试最多 5 次(指数退避),并带上 Range 从断点继续,已下好的部分不会白下;页面上会显示「连接中断,正在重连(第 n/5 次)」。
- 下载源顺序:官方 huggingface.co → 镜像 hf-mirror.com → ModelScope(魔搭,国内源)。三份文件在 ModelScope 上与官方仓库逐字节一致(文件名、字节数、SHA-256 都对得上),所以换源不影响模型本身。
- 「推理后端」可切到 litert:用 LiteRT Web runtime 跑 Qwen3-TTS 的 .tflite 图(Talker + MTP + Codec),固定在 CPU/WASM(XNNPACK)上推理,权重约 1.8GB;内置单一 demo 音色(demo_speaker),不支持多音色或声音克隆。实测可合成:约 5~6 秒的一句话在 CPU 上耗时 50~80 秒。
- 本地神经网络 TTS:用 Hojo-TTS-Light-40M(约 40M 参数,ONNX 格式)在浏览器 WASM 里推理,不联网、音频不出设备。
- 首次需下载模型(约 250MB:3 个 ONNX + 音色库 voice.npz + 分词器),之后走浏览器缓存可离线使用。
- llm / fine_local 是 BF16 权重,以原生精度在 WebGPU EP 上运行(WebGPU 原生支持 BF16,wasm/CPU 没有 BF16 算子内核,因此 BF16 模型必须走 WebGPU)。需支持 WebGPU 的浏览器。
- 若某个 ONNX 算子在浏览器 WASM 里没有实现(例如 Where),装载时会自动把它改写为基础算子(Cast/Sub/Mul/Add);仍失败则自动改用 WebGPU 执行提供程序兜底。
- 提供 15 种内置音色:2 个中文女声(hojo_zh_f_01/02)+ 13 个英文音色;不支持声音克隆。
- 「首选语言」会自动挑对应语言的音色(中文→hojo_zh、英文→hojo_en…);勾选「记住首选人声」会把你的选择存到本地、下次直接生效。
- 「人声微调」里的语速用 WSOLA 时间伸缩变速(0.5×–2×),保持音高不变调;随机种子让同一句话 + 同一人声可复现(同种子)或变化(不同种子);温度 / Top-P 控制生成多样性。
- 也能「选择模型目录」把模型落在本机磁盘(支持断点续传),或用「选择文件」直接指定已下好的权重文件——指定后完全不走网络,适合内网与离线环境。
- 选目录保存时,每个型号会写进各自的子目录(如 <目录>/hojo-light-40m/),避免 config.json、tokenizer.json 等同名文件互相覆盖。
- 浏览器不提供磁盘绝对路径,位置框只能显示文件夹名;可在「绝对路径」里手动填写用于记录,或点「另存到浏览器「下载」目录」按普通下载落盘(完整路径见 chrome://downloads)。
- 与系统语音(fun 分类的「文字转语音」)不同:那个依赖系统语音包、中文常缺失;这个是自带模型,中英文都能合成。
完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。
相关关键词:本地语音合成、AI 本地推理、tts、语音合成、文字转语音、离线、wasm、hojo、litert、qwen3-tts、tflite、神经网络、中文语音、text to speech、在线工具、免费
- 打开工具:打开「本地语音合成」页面,无需注册、无需安装任何软件。
- 准备输入:输入要朗读的中英文文本;首次使用需下载模型权重(默认后端约 250MB,切到 litert 后端约 1.8GB,之后可离线),选好音色即可在浏览器本地合成语音,音频不会离开你的设备。
- 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
- 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
- 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
- 下载很慢 / 连不上 huggingface.co?
- 下载源按「官方 huggingface.co → 镜像 hf-mirror.com → ModelScope(魔搭,国内源)」的顺序尝试,前一个连不上就换下一个。实测(2026-10-22)hf-mirror.com 的服务器当下完全不可达、huggingface.co 在国内被墙,所以国内用户实际走的是 ModelScope(9~10 MB/s,文件名与字节数和官方仓库逐一一致,SHA-256 校验同样通过)。「选择模型目录」后模型直接写进你选的文件夹(断点续传),下次从目录读取不再下载;也可以用别的工具提前把仓库下好,放进去装载。
- 合成没声音 / 一直转圈?
- 首次合成要装载 ~250MB 权重并在单线程 WASM 上自回归推理,长文本可能要几十秒到几分钟,请耐心等待;若长时间无响应,打开控制台看是否报 BF16 / WASM 相关错误。
Local Text-to-Speech
Neural speech synthesis entirely in the browser — no network, audio never leaves the device. Default backend: the Hojo-TTS family (Hojo-TTS-Light and Hojo-TTS-Light-40M, switchable from a dropdown; ~250 MB of weights, 15 Chinese and English voices). Switch the backend to litert to run Qwen3-TTS .tflite graphs (Talker + MTP + Codec) on LiteRT, pinned to CPU/WASM (~1.8 GB of weights, one demo voice). Weights can be downloaded (sources are tried in order: huggingface.co → hf-mirror.com → ModelScope, the China-hosted mirror, skipping whichever is unreachable; the ModelScope copies are byte-identical and SHA-256 still verified), saved into a folder you pick, or supplied directly with "Choose files" (nothing is downloaded then — works on intranets), downloads show total/percentage, live speed, estimated time left and the current file, and a dropped connection or 5xx triggers an automatic reconnect (up to 5 attempts, exponential backoff) that resumes from the last byte, with SHA-256 verification.
Belongs to “Local AI”: Run models locally in your browser with WASM: speech synthesis and local chat (with tavern features) work fully offline and never upload audio or conversations; the offline speech-to-text engine uses Whisper by default (int8 weights, ~43/76 MB), while the optional LiteRT-LM path is limited by the upstream runtime — see the tool page for details.
- While downloading you see the full picture: an overall progress bar, downloaded / total with a percentage, live speed, estimated time left, which file is in flight, and where this copy came from (local file / browser cache / resumed / chosen folder).
- **Automatic reconnect**: if the network drops, the connection is reset, or the source returns 5xx, the page retries up to 5 times (exponential backoff) and resumes with a Range request — bytes already downloaded are kept. The status line shows "Connection dropped — reconnecting (attempt n/5)".
- Source order: huggingface.co → hf-mirror.com → ModelScope (China-hosted). The ModelScope copies are byte-identical to the official repos (same file names, sizes and SHA-256), so switching sources does not change the model.
- Switch "Backend" to litert: Qwen3-TTS .tflite graphs (Talker + MTP + Codec) run on the LiteRT Web runtime, pinned to CPU/WASM (XNNPACK); the weights are ~1.8GB. One built-in demo voice (demo_speaker) — no multi-voice and no voice cloning. Measured: a 5–6 second sentence takes 50–80 seconds on CPU.
- Local neural TTS: Hojo-TTS-Light-40M (~40M params, ONNX) runs in the browser via WASM — no network, audio never leaves the device.
- First run downloads the model (~250MB: 3 ONNX files + voice.npz + tokenizer), then it is cached and works offline.
- llm / fine_local ship as BF16 and run natively on the WebGPU EP (WebGPU supports BF16 natively; wasm/CPU has no BF16 kernels, so BF16 models must use WebGPU). Requires a WebGPU-capable browser.
- If an ONNX op has no browser WASM kernel (e.g. Where), it is rewritten into basic ops (Cast/Sub/Mul/Add) at load time; if that still fails, it falls back to the WebGPU execution provider.
- 15 built-in voices: 2 Chinese female (hojo_zh_f_01/02) plus 13 English; voice cloning is not supported.
- The "Preferred language" auto-picks a matching voice (Chinese→hojo_zh, English→hojo_en…); tick "Remember this voice" to save your choice locally for next time.
- In "Voice tuning", Speed uses WSOLA time-stretching (0.5×–2×) so tempo changes without pitch shift; the seed makes the same text + voice reproducible (same seed) or varied (different seed); temperature / Top-P control diversity.
- You can also "Pick model folder" to store models on disk (resumable), or use "Choose files" to point at weights you already have — once files are chosen nothing is downloaded, which works for intranets and offline use.
- When saving to a folder, each model goes into its own subdirectory (e.g. <folder>/hojo-light-40m/) so same-named files such as config.json / tokenizer.json do not overwrite each other.
- Browsers do not expose the OS absolute path, so the location box only shows the folder name. Type it in "Absolute path" for your records, or click "Save to browser Downloads folder" to save like a normal download (full path: chrome://downloads).
- Unlike system speech (the "Text to speech" tool in Fun), this is a self-contained model that synthesizes both Chinese and English.
Free, no sign-up; everything runs locally in your browser and files are never uploaded.
Keywords: Local Text-to-Speech, Local AI, local tts, tts, speech synthesis, text to speech, offline, wasm, hojo, litert, qwen3-tts, tflite, neural network, chinese voice, tts engine, online tool, free
- Open the tool:Open the “Local Text-to-Speech” page — no sign-up and nothing to install.
- Prepare the input:Type the Chinese or English text to read aloud. The first use downloads the model weights (about 250 MB with the default backend, about 1.8 GB with the litert backend; then usable offline); pick a voice and speech is synthesized locally in your browser — the audio never leaves your device.
- 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.
- Download is slow / huggingface.co is unreachable?
- Sources are tried in order: huggingface.co → hf-mirror.com → ModelScope (China-hosted); each one is skipped when unreachable. Measured on 2026-10-22: hf-mirror.com is entirely unreachable and huggingface.co is blocked in China, so China-based users actually pull from ModelScope (9–10 MB/s, byte-identical files, SHA-256 still verified). "Pick model folder" writes models straight into your folder (resumable), or pre-fetch the repo with another tool and load it from there.
- No audio / stuck spinning?
- The first synthesis loads ~250MB of weights and runs autoregressive inference on a single WASM thread; long text can take tens of seconds to minutes. If it hangs, open the console for BF16 / WASM errors.