Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTS_CLI

TTS_CLI is a text-to-speech (TTS) script that allows you to convert text into spoken words using various TTS engines.

Installation

  1. Clone the repository:
git clone https://github.com/juanmirod/tts.git
  1. Navigate to the project directory:
cd tts
  1. Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Add your API keys to the .env file:
cp .env.sample .env
# open .env file and add your keys

Usage

tts is a command line command, you can run -h for help:

python -m tts.tts -h

Run it with the sample txt file and the default voice in OpenAI tts API:

python -m tts.tts sample.txt

Run it with google tts (free):

python -m tts.tts -g sample.txt

List available HuggingFace TTS models:

python -m tts.tts --list-hf-models

Example output:

Fetching top 20 HuggingFace TTS models...

Model ID                                   | Downloads | Likes
---------------------------------------------------------------------
espnet/eng_male_fgl                        |    123456 |   987
facebook/mms-tts-eng                       |    234567 |   876
...

Found 20 model(s).

Search for HuggingFace TTS models by keyword:

python -m tts.tts --search-hf-models hindi

Example output:

Searching for HuggingFace TTS models matching 'hindi'...

Model ID                              | Downloads | Likes
--------------------------------------------------------------------
espnet/hindi_male_fgl                 |     54321 |   432
...

Found 3 model(s).

Use a HuggingFace TTS model:

python -m tts.tts -hf --hf-model espnet/eng_male_fgl sample.txt

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

A tts command line tool using openAI or google tts or local model #tts #ai #openai

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages