https://github.com/hegedustibor/htgo-tts
Text to speech package for Golang.
https://github.com/hegedustibor/htgo-tts
go golang htgo-tts text-to-speech texttospeech tts
Last synced: about 1 year ago
JSON representation
Text to speech package for Golang.
- Host: GitHub
- URL: https://github.com/hegedustibor/htgo-tts
- Owner: hegedustibor
- License: mit
- Created: 2017-12-14T10:08:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T20:03:23.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T19:04:07.162Z (about 1 year ago)
- Topics: go, golang, htgo-tts, text-to-speech, texttospeech, tts
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 190
- Watchers: 1
- Forks: 48
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# htgo-tts
[https://hegedustibor.github.io/htgo-tts/](https://hegedustibor.github.io/htgo-tts/)
### Requirement:
- mplayer (optional)
### Install
```
go get "github.com/hegedustibor/htgo-tts"
```
### Update
```
go get -u "github.com/hegedustibor/htgo-tts"
```
### Remove
```
go clean -i "github.com/hegedustibor/htgo-tts"
```
### Import
```go
import "github.com/hegedustibor/htgo-tts"
import "github.com/hegedustibor/htgo-tts/voices"
```
### Use
```go
speech := htgotts.Speech{Folder: "audio", Language: voices.English}
speech.Speak("Your sentence.")
```
### Use with Handlers
```go
import (
htgotts "github.com/hegedustibor/htgo-tts"
handlers "github.com/hegedustibor/htgo-tts/handlers"
voices "github.com/hegedustibor/htgo-tts/voices"
)
speech := htgotts.Speech{Folder: "audio", Language: voices.English, Handler: &handlers.MPlayer{}}
speech.Speak("Your sentence.")
```
### Use tts without external player
Note: The "Native" handler works around the Oto librery, see the ["Prerequisite"](https://github.com/hajimehoshi/oto/blob/main/README.md#prerequisite) section to work with this handler
```go
import (
htgotts "github.com/hegedustibor/htgo-tts"
handlers "github.com/hegedustibor/htgo-tts/handlers"
voices "github.com/hegedustibor/htgo-tts/voices"
)
speech := htgotts.Speech{Folder: "audio", Language: voices.English, Handler: &handlers.Native{}}
speech.Speak("Your sentence.")
```
### Use with Proxy
```go
import (
htgotts "github.com/hegedustibor/htgo-tts"
handlers "github.com/hegedustibor/htgo-tts/handlers"
voices "github.com/hegedustibor/htgo-tts/voices"
)
speech := htgotts.Speech{Folder: "audio", Language: voices.English, Proxy: "https://..."}
speech.Speak("Your sentence.")
```
### Support and Contributions
If you encounter issues using HTGO-TTS or would like to suggest improvements to the source code, you can create an issue on the ["Issues"](https://github.com/hegedustibor/htgo-tts/issues) tab. If you'd like to contribute to the HTGO-TTS source code, please submit a pull request.
### License
HTGO-TTS is free software and is available under the MIT license. For more information, please see the LICENSE file in the source code repository.
Have Fun!