Documentation
¶
Index ¶
- Constants
- type Abbreviation
- type Client
- func (c *Client) GetCredit() (r *GetCreditResponse)
- func (c *Client) ListAbbreviations() (r *ListAbbreviationsResponse)
- func (c *Client) ListAudioFormats() (r *ListAudioFormatsResponse)
- func (c *Client) ListLexicons() (r *ListLexiconsResponse)
- func (c *Client) ListVoices() (r *ListVoicesResponse)
- func (c *Client) SpeakExtended(input *SpeakExtendedInput) (r *SpeakExtendedResponse)
- func (c *Client) SpeakSimple(input *SpeakSimpleInput) (r *SpeakSimpleResponse)
- func (c *Client) UploadAbbreviations(input *UploadAbbreviationsInput) (r *UploadAbbreviationsResponse)
- func (c *Client) UploadLexicon(input *UploadLexiconInput) (r *UploadLexiconResponse)
- type Credit
- type GetCreditResponse
- type Lexicon
- type ListAbbreviationsResponse
- type ListAudioFormatsResponse
- type ListLexiconsResponse
- type ListVoicesResponse
- type Request
- type Response
- type SpeakExtendedInput
- type SpeakExtendedResponse
- type SpeakSimpleInput
- type SpeakSimpleResponse
- type UploadAbbreviationsInput
- type UploadAbbreviationsResponse
- type UploadLexiconInput
- type UploadLexiconResponse
- type Voice
Constants ¶
const ( // VERSION is the global package version VERSION = "0.3.0" // DefaultRESTAPIURL is the default CereVoice Cloud REST API endpoint DefaultRESTAPIURL = "https://cerevoice.com/rest/rest_1_1.php" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Abbreviation ¶
type Abbreviation struct {
URL string `xml:"url"`
Language string `xml:"language"`
LastModified string `xml:"lastModified"`
Size string `xml:"size"`
}
Abbreviation contains details about an abbreviation
type Client ¶
type Client struct {
AccountID string // CereVoice Cloud API AccountID
Password string // CereVoice Cloud API Password
CereVoiceAPIURL string // CereVoice Cloud API URL
}
Client API connection settings
func (*Client) GetCredit ¶
func (c *Client) GetCredit() (r *GetCreditResponse)
GetCredit retrieves the credit information for the given account
func (*Client) ListAbbreviations ¶
func (c *Client) ListAbbreviations() (r *ListAbbreviationsResponse)
ListAbbreviations lists custom abbreviation file(s)
func (*Client) ListAudioFormats ¶
func (c *Client) ListAudioFormats() (r *ListAudioFormatsResponse)
ListAudioFormats lists the available audio encoding formats
func (*Client) ListLexicons ¶
func (c *Client) ListLexicons() (r *ListLexiconsResponse)
ListLexicons lists custom lexicon file(s)
func (*Client) ListVoices ¶
func (c *Client) ListVoices() (r *ListVoicesResponse)
ListVoices outputs information about the available voices
func (*Client) SpeakExtended ¶
func (c *Client) SpeakExtended(input *SpeakExtendedInput) (r *SpeakExtendedResponse)
SpeakExtended allows for more control over the audio output
func (*Client) SpeakSimple ¶
func (c *Client) SpeakSimple(input *SpeakSimpleInput) (r *SpeakSimpleResponse)
SpeakSimple synthesises input text with the selected voice
func (*Client) UploadAbbreviations ¶
func (c *Client) UploadAbbreviations(input *UploadAbbreviationsInput) (r *UploadAbbreviationsResponse)
UploadAbbreviations uploads and stores a custom abbreviation file
func (*Client) UploadLexicon ¶
func (c *Client) UploadLexicon(input *UploadLexiconInput) (r *UploadLexiconResponse)
UploadLexicon uploads and stores a custom lexicon file
type Credit ¶
type Credit struct {
FreeCredit string `xml:"freeCredit"`
PaidCredit string `xml:"paidCredit"`
CharsAvailable string `xml:"charsAvailable"`
}
Credit contains details about CereVoice Cloud credits
type GetCreditResponse ¶
GetCreditResponse contains response from getCredit
type Lexicon ¶
type Lexicon struct {
URL string `xml:"url"`
Language string `xml:"language"`
Accent string `xml:"accent"`
LastModified string `xml:"lastModified"`
Size string `xml:"size"`
}
Lexicon contains details about a lexicon
type ListAbbreviationsResponse ¶
type ListAbbreviationsResponse struct {
AbbreviationList []Abbreviation `xml:"abbreviationList>abbreviationFile"`
Error error
}
ListAbbreviationsResponse contains response from listAbbreviations
type ListAudioFormatsResponse ¶
type ListAudioFormatsResponse struct {
AudioFormats []string `xml:"formatList>format"`
Error error
}
ListAudioFormatsResponse contains response from listAudioFormats
type ListLexiconsResponse ¶
type ListLexiconsResponse struct {
LexiconList []Lexicon `xml:"lexiconList>lexiconFile"`
Error error
}
ListLexiconsResponse contains response from listLexicons
type ListVoicesResponse ¶
ListVoicesResponse contains response from listVoices
type Request ¶
type Request struct {
XMLName xml.Name
AccountID string `xml:"accountID"`
Password string `xml:"password"`
Voice string `xml:"voice,omitempty"`
Text string `xml:"text,omitempty"`
AudioFormat string `xml:"audioFormat,omitempty"`
SampleRate string `xml:"sampleRate,omitempty"`
Audio3D bool `xml:"audio3D,omitempty"`
Metadata bool `xml:"metadata,omitempty"`
LexiconFile string `xml:"lexiconFile,omitempty"`
AbbreviationFile string `xml:"abbreviationFile,omitempty"`
Language string `xml:"language,omitempty"`
Accent string `xml:"accent,omitempty"`
}
Request to CereVoice Cloud API
type SpeakExtendedInput ¶
type SpeakExtendedInput struct {
Voice string
Text string
AudioFormat string
SampleRate string
Audio3D bool
Metadata bool
}
SpeakExtendedInput contains speakExtended parameters
type SpeakExtendedResponse ¶
type SpeakExtendedResponse struct {
FileURL string `xml:"fileUrl"`
CharCount string `xml:"charCount"`
ResultCode string `xml:"resultCode"`
ResultDescription string `xml:"resultDescription"`
Metadata string `xml:"metadataUrl"`
Error error
}
SpeakExtendedResponse contains response from speakExtended
type SpeakSimpleInput ¶
SpeakSimpleInput contains speakSimple parameters
type SpeakSimpleResponse ¶
type SpeakSimpleResponse struct {
FileURL string `xml:"fileUrl"`
CharCount string `xml:"charCount"`
ResultCode string `xml:"resultCode"`
ResultDescription string `xml:"resultDescription"`
Error error
}
SpeakSimpleResponse contains response from speakSimple
type UploadAbbreviationsInput ¶
UploadAbbreviationsInput contains uploadAbbreviations parameters
type UploadAbbreviationsResponse ¶
type UploadAbbreviationsResponse struct {
ResultCode int `xml:"resultCode"`
ResultDescription string `xml:"resultDescription"`
Error error
}
UploadAbbreviationsResponse contains response from uploadAbbreviations
type UploadLexiconInput ¶
UploadLexiconInput contains uploadLexicon paramters
type UploadLexiconResponse ¶
type UploadLexiconResponse struct {
ResultCode int `xml:"resultCode"`
ResultDescription string `xml:"resultDescription"`
Error error
}
UploadLexiconResponse contains response from uploadLexicon
type Voice ¶
type Voice struct {
SampleRate string `xml:"sampleRate"`
VoiceName string `xml:"voiceName"`
LanguageCodeISO string `xml:"languageCodeISO"`
CountryCodeISO string `xml:"countryCodeISO"`
AccentCode string `xml:"accentCode"`
Sex string `xml:"sex"`
LanguageCodeMicrosoft string `xml:"languageCodeMicrosoft"`
Country string `xml:"country"`
Region string `xml:"region"`
Accent string `xml:"accent"`
}
Voice contains details about a voice