An open API service indexing awesome lists of open source software.

https://github.com/imrany/text-to-speech

Building a Text-to-Speech GenAI with Coqui TTS
https://github.com/imrany/text-to-speech

coqui-tts gradio-interface text-to-speech

Last synced: 3 months ago
JSON representation

Building a Text-to-Speech GenAI with Coqui TTS

Awesome Lists containing this project

README

        

#### Testing
```bash
tts --text "Hello Stackies and welcome to Getting Started with Speech Synthesis Campaign" --model_name tts_models/en/ek1/tacotron2 --out_path output/output.wav
```
Play the `output.wav` file using any audio player and listen to it say "Hello Stackies! Welcome to Getting Started with Speech Synthesis Campaign!".

Code Breakdown:

- tts --text "": The Coqui TTS command to generate speech from the provided text.
- --model_name : Specifies the model to use for speech synthesis. In the demo, the Tacotron 2 model is used.
- --out_path : Saves the generated speech to a file.

#### Project structure
Here’s a breakdown of the directory structure for the project:

- output/ - This is where the synthesized audio files will be saved.
- models.py- The script for fetching available TTS models from Cocqui.
- speakers.py - The script for fetching available speakers in a selected TTS model. Coqui models use a parameter called “speaker” to select what type of “voice” to use in generating speeches.
- languages.py- The script for fetching available languages in a selected TTS model.
- tts-script.py - The main file where you will create the TTS script for speech synthesis.'
- requirements.txt - This contains the dependencies needed to run the scripts.
- tts-app.py - The main file where you will create the TTS app with a Gradio Interface.

#### Running
```bash
python tts-app.py
```