1
0
Fork 0
mirror of synced 2026-12-06 18:52:25 +00:00
No description
  • Python 97.1%
  • Dockerfile 2.9%
Find a file
2021-06-09 15:53:31 -04:00
.github Update docker-publish.yml 2021-06-03 17:34:24 -04:00
subapps PyPI 2021-06-05 11:43:01 -04:00
utils Gluing everything together 2021-06-03 08:55:18 -04:00
.gitignore .gitignore 2021-06-01 17:35:47 -04:00
docker-compose.yml Docker hub 2021-06-09 15:53:22 -04:00
Dockerfile PyPI 2021-06-05 11:43:01 -04:00
LICENCE Implement subapps & Implement asyncgTTS 2021-06-02 15:47:22 -04:00
main.py Gluing everything together 2021-06-03 08:55:18 -04:00
README.md PyPI 2021-06-05 11:43:01 -04:00
requirements.txt PyPI 2021-06-05 11:43:01 -04:00

easy-gTTS-API

An easy to use gTTS middleman built using aiohttp.

Hosting

Docker is the preferred way to host an instance of the API.

Environment Variables:

  • EASY_GTTS_API_PORT: Configures the webserver port. Default is 8080.
  • EASY_GTTS_API_HOST: Configures the webserver host. Default is 0.0.0.0.

Authentication:

Store a Google Cloud SERVICE_ACCOUNT.JSON in /config.

Versions:

There are two subapps included: v1 and v1beta1, each mapping to Google's v1 and v1beta1 respectively.

Full URL example: netloc/v1/synthesize or netloc/v1beta1/synthesize

API

GET /synthesize

Returns TTS Speech from https://texttospeech.googleapis.com/v1beta1/text:synthesize.

Parameters:

  • ?text=: Text to be converted into speech.
  • ?lang=en-US: Language of the text to be converted into speech.
  • ?voice=en-US-Wavenet-D: Voice that will speak the text.
  • ?encoding=MP3: The encoding of the returned bytes.

GET /voices

Returns a list of voices that can be used for synthesis from https://texttospeech.googleapis.com/v1beta1/voices.

Parameters:

  • ?languageCode=None: The language code to be searched.