Skip to content

zaneli-sandbox/goyish-voicetext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

goyish-voicetext

VoiceText Web API Golang wrapper library

Installation

go get github.com/zaneli/goyish-voicetext/voicetext

Usage

import (
	"github.com/zaneli/goyish-voicetext/voicetext"
	"log"
	"os"
)

client := voicetext.NewClient(<YOUR_API_KEY>)
content, err := client.Tts("Hello world", voicetext.Show, nil)

if err != nil {
	log.Fatal(err)
}

file, err := os.Create("hello.wav")
if err != nil {
	log.Fatal(err)
}
file.Write(content)
client := voicetext.NewClient(<YOUR_API_KEY>)
content, err := client.Tts(
	"Hello world",
	voicetext.Haruka,
	voicetext.TtsOptions().Emotion(voicetext.Happiness).EmotionLevel(2).Pitch(50).Speed(150).Volume(120))

if err != nil {
	log.Fatal(err)
}

file, err := os.Create("hello.wav")
if err != nil {
	log.Fatal(err)
}
file.Write(content)

About

VoiceText Web API Golang wrapper library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages