360 Secure SkillHub
360 安全技能中心

speaker-local

这是本地运行的Kokoro TTS工具,核心功能是将文本、EPUB/PDF等转为语音,支持多语言多音色,可自定义音色混合比例、语速,还能拆分文档章节输出、流式实时播放无需存文件。典型场景包括文本朗读、制作有声书、实时语音播放。输入为文本字符串、文件或EPUB/PDF,输出为指定格式的音频文件或流式语音,通过命令行操作,需提前安装依赖及模型文件。

babysor
babysor
热度 65.08
最近更新 2026-05-11 17:28:11
分类:效率依赖:代码执行应用场景:file_conversion

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sayit
Metadata
name
speak
description
Text-to-speech using Kokoro local TTS. Use when the user wants to convert text to audio, read aloud, or generate speech.

speak

Convert text to speech locally with Kokoro TTS.

Quick start

# Text string → audio file
kokoro-tts <(echo "Hello world") hello.wav --voice af_sarah

# Text file → audio
kokoro-tts article.txt out.wav --voice af_heart

# Chinese
kokoro-tts story.txt out.wav --voice zf_xiaoni --lang cmn

# EPUB / PDF → chapter audio files
kokoro-tts book.epub --split-output ./chapters/ --format mp3 --voice bf_emma

# Voice blending (60-40 mix)
kokoro-tts input.txt out.wav --voice "af_sarah:60,am_adam:40"

# Adjust speed
kokoro-tts input.txt out.wav --voice am_adam --speed 1.2

# Stream playback (no file saved)
kokoro-tts input.txt --stream --voice af_nova

Install

uv tool install kokoro-tts

Model files (kokoro-v1.0.onnx, voices-v1.0.bin) must be in the working directory. Download once:

wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/kokoro-v1.0.onnx
wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/voices-v1.0.bin

Voices at a glance

Region Female Male
🇺🇸 en-us af_alloy af_heart af_sarah af_nova ... am_adam am_echo am_michael ...
🇬🇧 en-gb bf_alice bf_emma bf_lily ... bm_daniel bm_george ...
🇨🇳 cmn zf_xiaoni zf_xiaoxiao zf_xiaoyi ... zm_yunxi zm_yunyang ...
🇯🇵 ja jf_alpha jf_nezumi ... jm_kumo
🇫🇷 fr-fr ff_siwis —
🇮🇹 it if_sara im_nicola

For full voice list, options, and input format details, see reference.md.