https://github.com/vektorprogrammet/ttsaas
Text to speech as a service
https://github.com/vektorprogrammet/ttsaas
Last synced: 2 months ago
JSON representation
Text to speech as a service
- Host: GitHub
- URL: https://github.com/vektorprogrammet/ttsaas
- Owner: vektorprogrammet
- License: mit
- Created: 2020-09-30T15:20:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T00:18:59.000Z (about 4 years ago)
- Last Synced: 2024-06-21T02:11:57.386Z (almost 2 years ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TTSAAS
> Text To Speech As A Service
## Dependencies
Be sure to install the following go libraries:
```bash
go get github.com/hegedustibor/htgo-tts
go get github.com/kennygrant/sanitize
```
Also, the `htgo-tts` package requires `mplayer` to be installed, or it will throw an error.
```bash
sudo apt install mplayer
```
Finally, we need `ffmpeg` to increase the volume
```bash
sudo apt install ffmpeg
```
## Usage
### Setup
You might need to create a folder named `audio` in the directory of the executable.
### Running
Start the project with `go run main.go` or build and run the executable.
### Choosing a port
The service uses port 80 by default, but this can be configured by setting the `TTSAAS_PORT` environment variable.
## API usage
Navigating to `localhost:8000/hello%20world` will return an mp3 file with "Hello world" spoken out. The content type is `audio/mpeg`.
## HTML audio element example
The api can be used as a source for audio tags. For example:
```html
```