Edge Tts Chinese

Creative
音频

Convert Chinese text or files into MP3 audio using Microsoft Edge's neural voices with customizable voice options.

Install

openclaw skills install @effeceee/edge-tts-chinese

Edge TTS 中文转语音

将中文文章转换为语音音频(仅限中文)。

使用方法

方式1:直接输入文本

python3 edge_tts_chinese.py --text "你的中文文章内容"

方式2:从文件读取

python3 edge_tts_chinese.py --file 文章.txt

方式3:交互式输入

python3 edge_tts_chinese.py
# 然后粘贴文章内容,按 Ctrl+D 结束

参数说明

参数说明默认值
--text, -t直接输入文章内容-
--file, -f从文件读取文章-
--voice, -v语音名称zh-CN-XiaoxiaoNeural
--output, -o输出文件路径/tmp/edge_tts_chinese.mp3

可用语音

语音说明
zh-CN-XiaoxiaoNeural中文女声(默认)
zh-CN-YunxiNeural中文男声
zh-CN-XiaoyiNeural中文女声(年轻)
zh-CN-YunyangNeural中文男声(新闻)

使用场景

  • 随时需要将中文文章转为语音时使用
  • 例如:新闻朗读、故事讲述、通知播报等

技术说明

  • 使用 edge-tts(微软Edge浏览器语音合成)
  • 支持长文本(5000+字符测试通过)
  • 输出格式:MP3