Convert text to speech in multiple languages
Generate multilingual speech using text input
Generate speech from text with multiple language support
suf-02
Generate speech from text and audio sample
Convert text to speech in multiple languages
Generate audio from text with multiple language support
Generate audio from text in multiple languages
Generate speech from text in multiple languages
Runn Kokoro-82M v1.0
Convert text to speech in multiple languages
Generate audio from text in multiple languages
Generate speech from text in over 7000 languages
Gtts (Google Text-to-Speech) is a Python library and CLI tool that converts text into speech in multiple languages. It leverages the Google Translate Text-to-Speech API to synthesize natural-sounding speech. Gtts is an open-source tool designed to make text-to-speech conversion accessible and easy to use, with support for a wide range of languages and speech customization options.
• Text-to-Speech Conversion: Converts written text into spoken words using Google's API. • Multi-Language Support: Generates speech in multiple languages using ISO 639-1 language codes. • Speech Accent Customization: Allows the selection of regional accents for some languages. • Speech Speed Adjustment: Enables users to adjust the speed of the generated speech. • High-Quality Audio: Produces high-quality MP3 audio files as output. • Library and CLI Integration: Supports both Python library integration and command-line usage.
pip install gtts
in your terminal to install the library.from gtts import gTTS
in your Python script.tts = gTTS(text='Hello, this is an example of Gtts text-to-speech!', lang='en')
tts.save("hello.mp3")
What languages are supported by Gtts?
Gtts supports all languages and dialects available in Google Translate. You can specify the language using the lang
parameter with an ISO 639-1 language code.
How is the quality of the generated speech?
The speech generated by Gtts is of high quality, as it uses Google’s advanced text-to-speech synthesis. It offers natural-sounding speech with proper intonation and pacing.
What if I encounter installation issues?
If you experience issues installing Gtts, ensure you have the latest version of pip and setuptools. You can upgrade them using pip install --upgrade pip setuptools
before reinstalling Gtts.