ttsmaker is a Text-to-Speech library implemented using the TTSMaker API.
API documents is here.
New client with you token:
client := ttsmaker.NewClient("ttsmaker_demo_token")
listResp, err := client.GetVoiceList(context.Background())
Or, get voice list with languages:
listResp, err := client.GetVoiceListWithLang(context.Background(), "en")
support language: ["en","zh","es","ja","ko","de","fr","it","ru","pt","tr","ms","th","vi","id","he"]
statusResp, err := client.GetTokenStatus(context.Background())
orderRequest := &ttsmaker.OrderRequest{
Token: "ttsmaker_demo_token",
Text: "hello, world!",
VoiceID: "778",
AudioFormat: "mp3",
AudioSpeed: 1.0,
AudioVolume: 0,
TextParagraphPauseTime: 0,
}
orderResp, err := client.CreateOrder(context.Background(), orderRequest)