https://github.com/rorpage/openfaas-text-to-speech
Generate an MP3 of text using Google's Text-to-Speech
https://github.com/rorpage/openfaas-text-to-speech
audio mp3 openfaas python serverless text-to-speech tts
Last synced: 3 months ago
JSON representation
Generate an MP3 of text using Google's Text-to-Speech
- Host: GitHub
- URL: https://github.com/rorpage/openfaas-text-to-speech
- Owner: rorpage
- License: mit
- Created: 2017-11-28T20:55:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-31T23:51:24.000Z (over 6 years ago)
- Last Synced: 2025-04-26T04:44:37.064Z (5 months ago)
- Topics: audio, mp3, openfaas, python, serverless, text-to-speech, tts
- Language: Dockerfile
- Homepage: https://www.openfaas.com/
- Size: 26.4 KB
- Stars: 11
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenFaaS Text-to-Speech
[](https://www.openfaas.com)
## Deploying the function
Be sure to follow the instructions on the [FaaS repo](https://github.com/openfaas/faas) to deploy the Faas stack.
**Get the CLI**
You can install the [faas-cli](https://github.com/openfaas/faas-cli/) via `brew install faas-cli` or `curl -sSL https://get.openfaas.com | sudo sh`.
**Build and deploy**
Build and deploy your stack using the following commands:
```
$ faas-cli build -f text-to-speech.yml
$ faas-cli deploy -f text-to-speech.yml
```**Test**
Using `curl`, you can send a string to the function to generate an MP3 of speech:
```
$ curl http://localhost:8080/function/text-to-speech \
-d 'This is a test of OpenFaaS text to speech!' > output.mp3
```Also, you can optionally provide an `X-Language` header for a different language:
```
$ curl http://localhost:8080/function/text-to-speech \
-H 'X-Language: en-uk' \
-d 'This is a test of OpenFaaS text to speech!' > output.mp3
```A list of supported languages is [here](https://github.com/pndurette/gTTS#lang_list).