This project is an extension of PaddleSpeech's TTS (Text-to-Speech) streaming service, supporting mixed Chinese and English TTS as well as speaker ID selection. With our extension, users can utilize text-to-speech functionalities more flexibly.
This project includes the following main files:
-
pretrained_models.py: This is a modified model list file sourced from the PaddleSpeech library. You need to replace this file in your PaddleSpeech installation directory.
-
tts_engine: This is another modified file that should be replaced in a specific PaddleSpeech path to ensure the smooth operation of the streaming TTS service.
1、make sure you have NLTK support, and you need install necessary data operator
ntlk.down('averaged_perceptron_tagger')
-
Find your PaddleSpeech installation path by using the following command:
pip show paddlespeech
-
Replace the
pretrained_models.py
file in the following path:<your PaddleSpeech installation location>/site-packages/paddlespeech/resource/
-
Replace the
tts_engine
file in the following path:<your PaddleSpeech installation location>/site-packages/paddlespeech/server/engine/tts/online/onnx/
Use PP-TTS_mix_streaming's tts_online_application
to run your streaming TTS service. You can start it with the following command:
python -m paddlespeech.server ./tts_online_application.yaml
Ensure your environment meets the following requirements:
- PaddleSpeech version: 1.2.0
- PaddlePaddle version: 2.3.2
For more environment configurations, please refer to the requirements.txt
file.
Feel free to submit Issues or Pull Requests to improve and enhance the project. Your contributions are highly appreciated!
This project is licensed under the Apache License 2.0. For more details, please refer to the license file.