这个项目是一个基于 Python 的 TXT 文件阅读器,它可以将文本文件的内容转换为语音并进行播放。在阅读过程中,用户可以随时暂停并保存进度,以便以后继续阅读。项目利用了命令行工具 edge-tts 对文本进行语音合成,并使用 mpv 播放器播放生成的音频。
使用方法:
确保您已经安装了 Python 3.6 或更高版本。 使用 pip install edge-tts 安装项目所需的依赖库。 下载项目源代码并解压。 在终端中切换到项目目录。 运行 python read.py 启动项目。 根据提示输入 TXT 文件路径。
Project Name: Python-based TXT File Reader with Text-to-Speech (TTS)
This project is a Python-based TXT file reader that converts the content of text files into speech and plays it back. Users can pause and save their progress at any time during the reading process, allowing them to continue reading later. The project uses the command-line tool edge-tts for text-to-speech synthesis and the mpv player to play the generated audio.
Usage:
Make sure you have Python 3.6 or higher installed. Install the required dependencies with pip install edge-tts . Download the project source code and unzip it. Change to the project directory in your terminal. Run python read.py to start the project. Enter the TXT file path when prompted.