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
- Host: GitHub
- URL: https://github.com/imrany/text-to-speech
- Owner: imrany
- Created: 2024-11-13T14:43:59.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-13T14:46:22.000Z (7 months ago)
- Last Synced: 2025-01-19T23:20:13.540Z (5 months ago)
- Topics: coqui-tts, gradio-interface, text-to-speech
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```