clientutil

package module
v2.3.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 7 Imported by: 0

README

Go API client for VoiceBase

Build Status Go Report Card Docs License

APIs for speech recognition and speech analytics, powering insights every business needs.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

Installation

Install the client:

$ go get github.com/grokify/go-voicebase-v3

Add the following to your Go source:

import(
    "github.com/grokify/go-voicebase-v3"
)

Documentation for API Endpoints

All URIs are relative to https://apis.voicebase.com

Class Method HTTP request Description
DefinitionApi CreateKeywordSpottingGroup Put /v3/definition/spotting/groups/{groupId} Create or update keyword spotting group
DefinitionApi CreateVocabulary Put /v3/definition/vocabularies/{vocabularyId} Create or update a custom vocabulary
DefinitionApi DeleteKeywordSpottingGroupById Delete /v3/definition/spotting/groups/{groupId} Delete keyword spotting group
DefinitionApi DeleteVocabularyById Delete /v3/definition/vocabularies/{vocabularyId} Delete a custom vocabulary
DefinitionApi GetClassifier Get /v3/definition/prediction/classifiers/{classifierId} Retrieve details about a predictive classification model
DefinitionApi GetClassifiers Get /v3/definition/prediction/classifiers List predictive classification models
DefinitionApi GetDetector Get /v3/definition/prediction/detectors/{detectorId} Retrieve details about a detection model
DefinitionApi GetDetectors Get /v3/definition/prediction/detectors List detection models
DefinitionApi GetKeywordSpottingGroupById Get /v3/definition/spotting/groups/{groupId} Retrieve a keyword spotting Group
DefinitionApi GetKeywordSpottingGroups Get /v3/definition/spotting/groups List keyword spotting groups
DefinitionApi GetSearchableFields Get /v3/definition/media/search Retrieve the list of extended metadata searchable fields
DefinitionApi GetVocabularies Get /v3/definition/vocabularies List custom vocabularies
DefinitionApi GetVocabularyById Get /v3/definition/vocabularies/{vocabularyId} Retrieve a custom vocabulary.
DefinitionApi SetSearchableFields Put /v3/definition/media/search Define extended metadata searchable fields
KeyManagementApi CreateKey Post /v3/profile/keys Create API Key
KeyManagementApi DeleteKeyById Delete /v3/profile/keys/{keyId} Delete API key
KeyManagementApi GetKeyById Get /v3/profile/keys/{keyId} Retrieve details about an API key
KeyManagementApi GetKeys Get /v3/profile/keys List API Keys
MediaApi DeleteMediaById Delete /v3/media/{mediaId} Delete a media, transcripts and analytics results
MediaApi GetMediaById Get /v3/media/{mediaId} Retrieve transcript and analytical results from a media record
MediaApi GetMetadataById Get /v3/media/{mediaId}/metadata Retrieve metadata associated with a media record
MediaApi GetProgressById Get /v3/media/{mediaId}/progress Retrieve processing progress
MediaApi GetStreamByMediaIdAndName Get /v3/media/{mediaId}/streams/{streamName} Downloads the media identified by the stream name
MediaApi GetStreamsById Get /v3/media/{mediaId}/streams List streams
MediaApi GetSubtitleDfxpById Get /v3/media/{mediaId}/transcript/dfxp Retrieve DFXP transcript
MediaApi GetSubtitleWebVttById Get /v3/media/{mediaId}/transcript/webvtt Retrieve WEBVTT transcript
MediaApi GetSubtitlesById Get /v3/media/{mediaId}/transcript/srt Retrieve SRT transcript
MediaApi GetTextById Get /v3/media/{mediaId}/transcript/text Retrieve text transcript
MediaApi GetTranscript Get /v3/media/{mediaId}/transcript Retrieve transcript
MediaApi MediaQuery Get /v3/media List media records
MediaApi PostMedia Post /v3/media Upload a media file for transcription and analysis
MediaApi PostMediaById Post /v3/media/{mediaId} Align a transcript and re-run the job
MediaApi SetMetadataById Put /v3/media/{mediaId}/metadata Update media metadata

Documentation For Models

Documentation For Authorization

Authorization

  • Type: API key

Example

	auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
		Key: "APIKEY",
		Prefix: "Bearer", // Omit if not necessary.
	})
    r, err := client.Service.Operation(auth, args)

Author

https://github.com/grokify/

Support

https://stackoverflow.com/

Documentation

Index

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

func NewApiClientToken(token string) *voicebase.APIClient

Types

type Formatting

type Formatting struct {
	EnableNumberFormatting bool `json:"enableNumberFormatting"`
}

type LinkInfo

type LinkInfo struct {
	Href string `json:"href,omitempty"`
}
type Links struct {
	Self     LinkInfo `json:"self,omitempty"`
	Progress LinkInfo `json:"progress,omitempty"`
	Metadata LinkInfo `json:"metadata,omitempty"`
}

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

type Vocabulary struct {
	VocabularyName string
	Term           string
	SoundsLike     []string
}

func (*Vocabulary) ToVbVocabulary

func (v *Vocabulary) ToVbVocabulary() voicebase.VbVocabulary

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL