https://github.com/duc11021102/pyspeech
Python Text To Speech Using gTTS @duc11021102
https://github.com/duc11021102/pyspeech
anki anki-flashcards gtts-library mp3-downloader pygame pyinstaller sound terminal-based text-to-speech translate-google
Last synced: 4 months ago
JSON representation
Python Text To Speech Using gTTS @duc11021102
- Host: GitHub
- URL: https://github.com/duc11021102/pyspeech
- Owner: duc11021102
- License: mit
- Created: 2025-04-10T15:00:27.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-08-13T05:15:41.000Z (5 months ago)
- Last Synced: 2025-08-13T07:08:07.403Z (5 months ago)
- Topics: anki, anki-flashcards, gtts-library, mp3-downloader, pygame, pyinstaller, sound, terminal-based, text-to-speech, translate-google
- Language: Python
- Homepage:
- Size: 599 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## PySpeech
You can create mp3 file with text and gTTS library (Google Translate's text-to-speech API)


```
What the program does?
- Generate mp3 file with text
- Generate multiple mp3 files through .txt file
- Multilingual
- A terminal windows program
```
## Quick start
The simplest method is to install the portable version using the .exe file, available at this link.
Or install with python:
### Requirements
* Python (pip v25 or newer, python v3.10 or newer)
* Python Libraries: `gTTS pygame pyinstaller`
### Setup
- Install the dependencies following these steps :
- Star this repository
- <>Code > Download ZIP > Open cmd/terminal in that location
- Run this command : `pip install -r requirements.txt`
- Run `tts-audio.py` or open `tts-audio.bat` after installation
- If you want to build and creat a .exe program:
- Run this command : `pyinstaller --onefile --icon=icon.ico tts-audio.py`
- Your .exe file in your generated dist folder
### Setup with Docker
- Pull and run:
- Run this command : `docker pull duc11021102/text-to-speech-audio`
- Run this command : `docker run -it duc11021102/text-to-speech-audio`
### Command
```/m``` - change mode (one .mp3 file or multiple .mp3 files)
```/c``` - check current language
```/s``` - enable/disable automatic audio playback
```/*lang*``` - change language, default language is Chinese (Traditional), check this file to use
Example: ```/vi``` - change to Vietnamese
## Plans for future
- Make add-on in Anki