Convert text to speech using Google Text-to-Speech API in your terminal!
Make sure you have Python3 and pip installed.
git clone https://github.com/CodeObser/tts-cli
cd tts-cli
pip3 install -r requirements.txt
python3 tts.py "Hello, this is a test." -o output.mp4
• -o, --output <output_file>
: Specify the output file name (default: output.mp3).
• -l, --lang <language_code>
: Specify the language code (default: en).
• -s, --slow: Speak slowly.-f, --format <audio_format>
: Specify the output audio format (choices: mp3, wav; default: mp3).
• -p, --play
: Play audio after conversion.
• -ls, --list-languages
: List supported languages.
Convert text to speech in French and save it as a WAV file:
python3 tts.py "Bonjour, c'est un test." -o output.wav -l fr -f wav