Documentation ¶
Overview ¶
Package ivona provides the binding for IVONA Speech Cloud API
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
Input contains attributes describing the user input. For more details see http://developer.ivona.com/en/speechcloud/api_ref_data_types.html#DataTypes_Input.
type Ivona ¶
Ivona is used to invoke API calls
func (*Ivona) CreateSpeech ¶
func (client *Ivona) CreateSpeech(options SpeechOptions) (*SpeechResponse, error)
CreateSpeech performs a synthesis of the requested text and returns the audio stream containing the speech.
Example ¶
package main import ( "log" ivona "github.com/jpadilla/ivona-go" ) func main() { client := ivona.New("IVONA_ACCESS_KEY", "IVONA_SECRET_KEY") options := ivona.NewSpeechOptions("Hello World") r, err := client.CreateSpeech(options) if err != nil { log.Fatal(err) } log.Printf("%v\n", len(r.Audio)) log.Printf("%v\n", r.ContentType) log.Printf("%v\n", r.RequestID) }
Output:
func (*Ivona) ListVoices ¶
func (client *Ivona) ListVoices(options Voice) (*ListResponse, error)
ListVoices retrieves list of voices from the api
Example ¶
package main import ( "log" ivona "github.com/jpadilla/ivona-go" ) func main() { client := ivona.New("IVONA_ACCESS_KEY", "IVONA_SECRET_KEY") r, err := client.ListVoices(ivona.Voice{}) if err != nil { log.Fatal(err) } log.Printf("%v\n", len(r.Voices)) }
Output:
type ListResponse ¶
ListResponse is the resource representing response from ListVoices action.
type OutputFormat ¶
OutputFormat contains attributes describing the audio compression and format in which the returned stream should be encoded. For more details see http://developer.ivona.com/en/speechcloud/api_ref_data_types.html#DataTypes_OutputFormat.
type Parameters ¶
Parameters contains additional attributes affecting the generated speech. For more details see http://developer.ivona.com/en/speechcloud/api_ref_data_types.html#DataTypes_Parameters.
type SpeechOptions ¶
type SpeechOptions struct { Input *Input OutputFormat *OutputFormat Parameters *Parameters Voice *Voice }
SpeechOptions is the set of parameters that can be used on the CreateSpeech action. For more details see http://developer.ivona.com/en/speechcloud/api_ref_actions.html#CreateSpeech.
func NewSpeechOptions ¶
func NewSpeechOptions(data string) SpeechOptions
NewSpeechOptions is the set of default parameters that can be used the CreateSpeech action. For more details see http://developer.ivona.com/en/speechcloud/api_ref_actions.html#CreateSpeech_DefaultValues.
type SpeechResponse ¶
SpeechResponse is the resource representing response from CreateSpeech action.