Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leprosus/golang-tts
Text-to-Speach golang package based in Amazon Polly service
https://github.com/leprosus/golang-tts
amazon amazon-web-services aws golang polly text-to-speech tts
Last synced: about 1 month ago
JSON representation
Text-to-Speach golang package based in Amazon Polly service
- Host: GitHub
- URL: https://github.com/leprosus/golang-tts
- Owner: leprosus
- License: gpl-3.0
- Created: 2017-05-14T10:26:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-23T09:40:47.000Z (about 2 years ago)
- Last Synced: 2024-02-24T19:34:22.367Z (5 months ago)
- Topics: amazon, amazon-web-services, aws, golang, polly, text-to-speech, tts
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 27
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: License.md
Lists
- awesome - leprosus/golang-tts - Text-to-Speach golang package based in Amazon Polly service (Go)
README
# Golang Text-to-Speech package base on AWS Polly
## Getting access
Just go to [https://console.aws.amazon.com/iam/home#/security_credential](https://console.aws.amazon.com/iam/home#/security_credential) (if haven't registered user then to have sign up) and open **Access Keys** tab
## Settings
```go
polly := golang_tts.New("AKIBI2FJJVG77M7OC3DQ", "/PEiT4T+27zG7E0Z4+8EJHASn92Au7JWMNrGwR8Z")polly.Format(golang_tts.MP3)
polly.Voice(golang_tts.Brian)text := "To read or not to read"
bytes, err := polly.Speech(text)
if err != nil {
panic(err)
}ioutil.WriteFile("./result.mp3", bytes, 0644)
```## List of all methods
* golang_tts.New(accessKey, secretKey) - initializes new TTS client
* golang_tts.Engine(golang_ttl.NEURAL) - sets engine (standard is default)
* golang_tts.Format(golang_ttl.MP3) - sets output format (mp3 is default)
* golang_tts.SampleRate(golang_ttl.RATE_22050) - sets sample rate (22050 is default)
* golang_tts.Language("en-GB") - sets language (en-US is default)
* golang_tts.Voice(golang_ttl.Brian) - sets voice (Brian is default)
* golang_tts.Speech("text to speech") - sends text to synthesize