Documentation ¶
Index ¶
- Constants
- func BuildVocabulariesForStrings(vocabNames ...string) []voicebase.VbVocabulary
- func NewApiClientToken(token string) *voicebase.APIClient
- type Formatting
- type LinkInfo
- type Links
- type MediaConfiguration
- type SpeechModel
- type Transcript
- type UploadMediaConfiguration
- type UploadMediaResponse
- type Vocabulary
Constants ¶
View Source
const (
ApiUrlV3Media = "https://apis.voicebase.com/v3/media"
)
Variables ¶
This section is empty.
Functions ¶
func BuildVocabulariesForStrings ¶
func BuildVocabulariesForStrings(vocabNames ...string) []voicebase.VbVocabulary
BuildVocabulariesForStrings takes a list of strings and converts them to a list of `VbVocabulary` structs for use in uploading media.
func NewApiClientToken ¶
Types ¶
type Formatting ¶
type Formatting struct {
EnableNumberFormatting bool `json:"enableNumberFormatting"`
}
type MediaConfiguration ¶
type MediaConfiguration struct { Language string EnableNumberFormatting bool Vocabularies []voicebase.VbVocabulary }
func (*MediaConfiguration) ToConfiguration ¶
func (mc *MediaConfiguration) ToConfiguration() UploadMediaConfiguration
type SpeechModel ¶
type SpeechModel struct {
Language string `json:"language,omitempty"`
}
type Transcript ¶
type Transcript struct {
Formatting Formatting `json:"formatting"`
}
type UploadMediaConfiguration ¶
type UploadMediaConfiguration struct { SpeechModel SpeechModel `json:"speechModel,omitempty"` Transcript Transcript `json:"transcript"` Vocabularies []voicebase.VbVocabulary `json:"vocabularies,omitempty"` }
func BuildUploadMediaConfiguration ¶
func BuildUploadMediaConfiguration(lang string, vocabs []voicebase.VbVocabulary, numFormatting bool) UploadMediaConfiguration
type UploadMediaResponse ¶
type UploadMediaResponse struct { Links Links `json:"_links,omitempty"` FormatVersion string `json:"formatVersion,omitempty"` MediaId string `json:"mediaId,omitempty"` Status string `json:"status,omitempty"` DateCreated time.Time `json:"dateCreated,omitempty"` Metadata interface{} `json:"metadata,omitempty"` MediaContentType string `json:"mediaContentType,omitempty"` Length int `json:"length,omitempty"` }
func UploadMedia ¶
func UploadMedia(client *http.Client, filepath string, cfg UploadMediaConfiguration, verbose bool) (*UploadMediaResponse, *http.Response, error)
type Vocabulary ¶
func (*Vocabulary) ToVbVocabulary ¶
func (v *Vocabulary) ToVbVocabulary() voicebase.VbVocabulary
Click to show internal directories.
Click to hide internal directories.