Skip to content

bganderson/cerevoicego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CereVoice Go

CereVoice Go is a Go package for accessing the CereProc CereVoice Cloud API. Currently this package implements all available functions using the REST API. SOAP has not yet been implemented.

Notice

Please note that is package is not complete and is considered pre-release, meaning it is subject to change. Safety not guaranteed.

Usage

Assuming you have Go already setup and working, grab the latest version of the package from master.

go get github.com/bganderson/cerevoicego

Import the package into your project.

import "github.com/bganderson/cerevoicego"

Create a cerevoice client. Please note that AccountID and Password are not the same credentials you use to login to the website.

For the REST API URL you can use the exported const provided by the package.

cerevoice := cerevoicego.Client{
    CereVoiceAPIURL: cerevoicego.DefaultRESTAPIURL,
    AccountID:       "<YOUR_ACCOUNTID>",
    Password:        "<YOUR_PASSWORD",
}

Make an API request and do something with the response.

res := cerevoice.SpeakSimple(&cerevoicego.SpeakSimpleInput{
    Voice: "Jess",
    Text:  "Hello world!",
})
if res.Error != nil {
    log.Fatalln(res.Error)
}

fmt.Printf("The sound file is available at: %s\n", res.FileURL)

About

CereVoice Cloud API Library for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages