AI资讯大全AIPPXP.CN搜索 ↗
手把手教程 · 图文步骤

Graphic tutorial: Use edge-tts to turn text into natural speech (free)图文教程:用 edge-tts 把文字变成自然语音(免费)

No need to apply for a key or spend money, just one command to turn the article into MP3. It is useful for dubbing videos and listening to articles.

不申请密钥、不花钱,一条命令把文章变MP3。做视频配音、听文章都好用。

2026-09-24 更新 · 免费
图文教程:用 edge-tts 把文字变成自然语音(免费)
1

Prepare Python environment准备Python环境

Go to python.org to download and install Python (check Add to PATH). There are also instructions in the "AI Tools" column of this site.

中文

到 python.org 下载安装Python(勾选 Add to PATH),本站「AI工具」栏目也有说明。

2

Install edge-tts安装 edge-tts

Go to the "AI Tools" section of this site to find edge-tts, download the Python installation package and unzip it.

Enter the decompression directory with the command line and execute pip install ./edge_tts-7.2.8 to complete the installation.

中文

到本站「AI工具」栏目找到 edge-tts,下载Python安装包并解压。

命令行进入解压目录,执行 pip install ./edge_tts-7.2.8 完成安装。

3

Generate the first speech生成第一段语音

Execution: edge-tts --voice zh-CN-XiaoxiaoNeural --text "Hello, this is a voice generated by AI" --write-media hello.mp3

After completion, hello.mp3 will appear in the current directory, double-click to listen.

中文

执行:edge-tts --voice zh-CN-XiaoxiaoNeural --text "你好,这是AI生成的语音" --write-media hello.mp3

完成后当前目录出现 hello.mp3,双击试听。

4

Practical Tips实用技巧

Change the voice: execute edge-tts --list-voices to view all, Xiaoxiao (female voice) and Yunxi (male voice) are the most commonly used.

Long article: Save the text as txt, read it with the --file parameter, and generate the entire speech at once.

中文

换音色:执行 edge-tts --list-voices 查看全部,晓晓(女声)和云希(男声)最常用。

长文章:把文本存成txt,用 --file 参数读取,一次生成整篇语音。

Notes使用提醒

This article is compiled from public sources and ships with the matching resource. Product features and pricing are subject to the official page. Resources are for learning and exchange only — please respect the original license.

中文

本文整理自公开资料并附上配套资源;涉及产品的功能与价格以官方页面为准。资源仅供学习交流,请遵循来源许可。

资源下载 · Download

本篇为图文教程,直接按步骤操作即可,无需下载文件。

0阅读0 条评论

阅读与点赞数据保存在你的浏览器本地,欢迎留下你的想法。

评论 文明发言,让讨论更有价值

正能量公益广告今日正能量学一点,用一点;今天种下的种子,会长成明天的能力。去免费下载专区 →广告