Documentation
¶
Index ¶
- func GetJson(resp *http.Response, target interface{}) error
- func SecondsToTimestamp(seconds float64) string
- type Alternative
- type Balance
- type BalanceList
- type BufferSource
- type Channel
- type Client
- func (dg *Client) CreateKey(projectId string, comment string, scopes []string, options CreateKeyOptions) (Key, error)
- func (dg *Client) DeleteInvitation(projectId string, email string) (Message, error)
- func (dg *Client) DeleteKey(projectId string, keyId string) (Message, error)
- func (dg *Client) DeleteProject(projectId string) (Message, error)
- func (dg *Client) GetBalance(projectId string, balanceId string) (Balance, error)
- func (dg *Client) GetFields(projectId string, options UsageRequestListOptions) (interface{}, error)
- func (dg *Client) GetKey(projectId string, keyId string) (KeyResponseObj, error)
- func (dg *Client) GetMemberScopes(projectId string, memberId string) (ScopeList, error)
- func (dg *Client) GetProject(projectId string) (Project, error)
- func (dg *Client) GetRequest(projectId string, requestId string) (UsageRequest, error)
- func (dg *Client) GetUsage(projectId string, options UsageOptions) (UsageSummary, error)
- func (dg *Client) LeaveProject(projectId string) (Message, error)
- func (dg *Client) ListBalances(projectId string) (BalanceList, error)
- func (dg *Client) ListInvitations(projectId string) (InvitationList, error)
- func (dg *Client) ListKeys(projectId string) (KeyResponse, error)
- func (dg *Client) ListMembers(projectId string) (MemberList, error)
- func (dg *Client) ListProjects() (ProjectResponse, error)
- func (dg *Client) ListRequests(projectId string, options UsageRequestListOptions) (UsageRequestList, error)
- func (dg *Client) LiveTranscription(options LiveTranscriptionOptions) (*websocket.Conn, *http.Response, error)
- func (dg *Client) PreRecordedFromStream(source ReadStreamSource, options PreRecordedTranscriptionOptions) (*PreRecordedResponse, error)
- func (dg *Client) PreRecordedFromURL(source UrlSource, options PreRecordedTranscriptionOptions) (PreRecordedResponse, error)
- func (dg *Client) RemoveMember(projectId string, memberId string) (Message, error)
- func (dg *Client) SendInvitation(projectId string, options InvitationOptions) (Message, error)
- func (dg *Client) UpdateMemberScopes(projectId string, memberId string, scope string) (Message, error)
- func (dg *Client) UpdateProject(projectId string, options ProjectUpdateOptions) (Message, error)
- func (c *Client) WithHost(host string) *Client
- func (c *Client) WithPath(path string) *Client
- type CreateKeyOptions
- type CreateKeyRequest
- type EntityBase
- type Hit
- type InvitationList
- type InvitationOptions
- type Key
- type KeyResponse
- type KeyResponseObj
- type LiveTranscriptionOptions
- type Member
- type MemberList
- type MemberScope
- type Message
- type Metadata
- type PreRecordedResponse
- type PreRecordedTranscriptionOptions
- type Project
- type ProjectResponse
- type ProjectUpdateOptions
- type ReadStreamSource
- type Results
- type ScopeList
- type Search
- type Topic
- type TopicBase
- type TranscriptionSource
- type UrlSource
- type UsageOptions
- type UsageRequest
- type UsageRequestList
- type UsageRequestListOptions
- type UsageResponseDetail
- type UsageSummary
- type Utterance
- type WordBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecondsToTimestamp ¶ added in v0.5.0
Types ¶
type Alternative ¶
type Alternative struct { Transcript string `json:"transcript"` Confidence float64 `json:"confidence"` Words []WordBase `json:"words"` Topics []TopicBase `json:"topics"` Entities []EntityBase `json:"entities"` }
type BalanceList ¶ added in v0.6.0
type BalanceList struct {
Balances []Balance `json:"balances"`
}
type BufferSource ¶
type Channel ¶
type Channel struct { Search []Search `json:"search"` Alternatives []Alternative `json:"alternatives"` }
type Client ¶
func (*Client) DeleteInvitation ¶
func (*Client) DeleteProject ¶ added in v0.6.0
func (*Client) GetBalance ¶ added in v0.6.0
func (*Client) GetFields ¶ added in v0.6.0
func (dg *Client) GetFields(projectId string, options UsageRequestListOptions) (interface{}, error)
func (*Client) GetKey ¶ added in v0.6.0
func (dg *Client) GetKey(projectId string, keyId string) (KeyResponseObj, error)
func (*Client) GetMemberScopes ¶ added in v0.6.0
func (*Client) GetProject ¶ added in v0.6.0
func (*Client) GetRequest ¶ added in v0.6.0
func (dg *Client) GetRequest(projectId string, requestId string) (UsageRequest, error)
func (*Client) GetUsage ¶ added in v0.6.0
func (dg *Client) GetUsage(projectId string, options UsageOptions) (UsageSummary, error)
func (*Client) LeaveProject ¶ added in v0.6.0
func (*Client) ListBalances ¶ added in v0.6.0
func (dg *Client) ListBalances(projectId string) (BalanceList, error)
func (*Client) ListInvitations ¶
func (dg *Client) ListInvitations(projectId string) (InvitationList, error)
func (*Client) ListKeys ¶ added in v0.6.0
func (dg *Client) ListKeys(projectId string) (KeyResponse, error)
func (*Client) ListMembers ¶ added in v0.6.0
func (dg *Client) ListMembers(projectId string) (MemberList, error)
func (*Client) ListProjects ¶ added in v0.6.0
func (dg *Client) ListProjects() (ProjectResponse, error)
func (*Client) ListRequests ¶
func (dg *Client) ListRequests(projectId string, options UsageRequestListOptions) (UsageRequestList, error)
func (*Client) LiveTranscription ¶
func (*Client) PreRecordedFromStream ¶ added in v0.7.0
func (dg *Client) PreRecordedFromStream(source ReadStreamSource, options PreRecordedTranscriptionOptions) (*PreRecordedResponse, error)
func (*Client) PreRecordedFromURL ¶
func (dg *Client) PreRecordedFromURL(source UrlSource, options PreRecordedTranscriptionOptions) (PreRecordedResponse, error)
func (*Client) RemoveMember ¶ added in v0.6.0
func (*Client) SendInvitation ¶
func (dg *Client) SendInvitation(projectId string, options InvitationOptions) (Message, error)
func (*Client) UpdateMemberScopes ¶ added in v0.6.0
func (*Client) UpdateProject ¶ added in v0.6.0
func (dg *Client) UpdateProject(projectId string, options ProjectUpdateOptions) (Message, error)
type CreateKeyOptions ¶ added in v0.6.0
type CreateKeyRequest ¶ added in v0.6.0
type EntityBase ¶ added in v0.7.0
type InvitationList ¶
type InvitationList struct {
Invites []InvitationOptions `json:"invites"`
}
type InvitationOptions ¶
type KeyResponse ¶ added in v0.6.0
type KeyResponse struct {
ApiKeys []KeyResponseObj `json:"api_keys"`
}
type KeyResponseObj ¶ added in v0.6.0
type LiveTranscriptionOptions ¶
type LiveTranscriptionOptions struct { Alternatives int `json:"alternatives" url:"alternatives,omitempty" ` Callback string `json:"callback" url:"callback,omitempty" ` Channels int `json:"channels" url:"channels,omitempty" ` Dates bool `json:"dates" url:"dates,omitempty"` // Indicates whether to convert dates from written format (e.g., january first) to numerical format (e.g., 01-01). Diarize bool `json:"diarize" url:"diarize,omitempty" ` Diarize_version string `json:"diarize_version" url:"diarize_version,omitempty" ` Dictation bool `json:"dictation" url:"dictation,omitempty"` // Option to format punctuated commands. Eg: "i went to the store period new paragraph then i went home" --> "i went to the store. <\n> then i went home" Encoding string `json:"encoding" url:"encoding,omitempty" ` Endpointing string `json:"endpointing" url:"endpointing,omitempty" ` // Can be "false" to disable endpointing, or can be the milliseconds of silence to wait before returning a transcript. Default is 10 milliseconds. Is string here so it can accept "false" as a value. Interim_results bool `json:"interim_results" url:"interim_results,omitempty" ` Keywords []string `json:"keywords" url:"keywords,omitempty" ` KeywordBoost string `json:"keyword_boost" url:"keyword_boost,omitempty" ` Language string `json:"language" url:"language,omitempty" ` Measurements bool `json:"measurements" url:"measurements,omitempty" ` Model string `json:"model" url:"model,omitempty" ` Multichannel bool `json:"multichannel" url:"multichannel,omitempty" ` Ner bool `json:"ner" url:"ner,omitempty" ` Numbers bool `json:"numbers" url:"numbers,omitempty" ` Numerals bool `json:"numerals" url:"numerals,omitempty" ` Profanity_filter bool `json:"profanity_filter" url:"profanity_filter,omitempty" ` Punctuate bool `json:"punctuate" url:"punctuate,omitempty" ` Redact bool `json:"redact" url:"redact,omitempty" ` Replace string `json:"replace" url:"replace,omitempty" ` Sample_rate int `json:"sample_rate" url:"sample_rate,omitempty" ` Search []string `json:"search" url:"search,omitempty" ` Tag []string `json:"tag" url:"tag,omitempty" ` Tier string `json:"tier" url:"tier,omitempty" ` Times bool `json:"times" url:"times,omitempty" ` Vad_turnoff int `json:"vad_turnoff" url:"vad_turnoff,omitempty" ` Version string `json:"version" url:"version,omitempty" ` }
type MemberList ¶ added in v0.6.0
type MemberList struct {
Members []Member `json:"members"`
}
type MemberScope ¶ added in v0.6.0
type MemberScope struct {
Scope string `json:"scope"`
}
type PreRecordedResponse ¶
type PreRecordedResponse struct { Request_id string `json:"request_id"` Metadata Metadata `json:"metadata"` Results Results `json:"results"` }
func (*PreRecordedResponse) ToSRT ¶ added in v0.5.0
func (resp *PreRecordedResponse) ToSRT() (string, error)
func (*PreRecordedResponse) ToWebVTT ¶ added in v0.5.0
func (resp *PreRecordedResponse) ToWebVTT() (string, error)
type PreRecordedTranscriptionOptions ¶
type PreRecordedTranscriptionOptions struct { Alternatives int `json:"alternatives" url:"alternatives,omitempty" ` AnalyzeSentiment bool `json:"analyze_sentiment" url:"analyze_sentiment,omitempty" ` Callback string `json:"callback" url:"callback,omitempty" ` Dates bool `json:"dates" url:"dates,omitempty"` // Indicates whether to convert dates from written format (e.g., january first) to numerical format (e.g., 01-01). DetectEntities bool `json:"detect_entities" url:"detect_entities,omitempty"` DetectLanguage bool `json:"detect_language" url:"detect_language,omitempty" ` DetectTopics bool `json:"detect_topics" url:"detect_topics,omitempty" ` Diarize bool `json:"diarize" url:"diarize,omitempty" ` Diarize_version string `json:"diarize_version" url:"diarize_version,omitempty" ` Dictation bool `json:"dictation" url:"dictation,omitempty"` // Option to format punctuated commands. Eg: "i went to the store period new paragraph then i went home" --> "i went to the store. <\n> then i went home" Keywords []string `json:"keywords" url:"keywords,omitempty" ` KeywordBoost string `json:"keyword_boost" url:"keyword_boost,omitempty" ` Language string `json:"language" url:"language,omitempty" ` Measurements bool `json:"measurements" url:"measurements,omitempty"` Model string `json:"model" url:"model,omitempty" ` Multichannel bool `json:"multichannel" url:"multichannel,omitempty" ` Ner bool `json:"ner" url:"ner,omitempty" ` Numbers bool `json:"numbers" url:"numbers,omitempty" ` Numerals bool `json:"numerals" url:"numerals,omitempty" ` // Same as Numbers, old name for same option Paragraphs bool `json:"paragraphs" url:"paragraphs,omitempty" ` Profanity_filter bool `json:"profanity_filter" url:"profanity_filter,omitempty" ` Punctuate bool `json:"punctuate" url:"punctuate,omitempty" ` Redact bool `json:"redact" url:"redact,omitempty" ` Replace []string `json:"replace" url:"replace,omitempty" ` Search []string `json:"search" url:"search,omitempty" ` Sentiment bool `json:"sentiment" url:"sentiment,omitempty" ` SentimentThreshold float64 `json:"sentiment_threshold" url:"sentiment_threshold,omitempty" ` Summarize bool `json:"summarize" url:"summarize,omitempty" ` Tag []string `json:"tag" url:"tag,omitempty"` Tier string `json:"tier" url:"tier,omitempty" ` Times bool `json:"times" url:"times,omitempty"` // Indicates whether to convert times from written format (e.g., 3:00 pm) to numerical format (e.g., 15:00). Translate string `json:"translate" url:"translate,omitempty" ` Utterances bool `json:"utterances" url:"utterances,omitempty" ` Utt_split int `json:"utt_split" url:"utt_split,omitempty" ` Version string `json:"version" url:"version,omitempty" ` }
type ProjectResponse ¶ added in v0.6.0
type ProjectResponse struct {
Projects []Project `json:"projects"`
}
type ProjectUpdateOptions ¶ added in v0.6.0
type ReadStreamSource ¶
type TranscriptionSource ¶
type TranscriptionSource interface { ReadStreamSource | UrlSource | BufferSource }
type UsageOptions ¶ added in v0.6.0
type UsageOptions struct { Accessor string `json:"accessor" url:"accessor,omitempty"` Alternatives bool `json:"alternatives" url:"alternatives,omitempty"` AnalyzeSentiment bool `json:"analyze_sentiment" url:"analyze_sentiment,omitempty"` DetectEntities bool `json:"detect_entities" url:"detect_entities,omitempty"` DetectLanguage bool `json:"detect_language" url:"detect_language,omitempty"` DetectTopics bool `json:"detect_topics" url:"detect_topics,omitempty"` Diarize bool `json:"diarize" url:"diarize,omitempty"` End string `json:"end" url:"end,omitempty"` InterimResults bool `json:"interim_results" url:"interim_results,omitempty"` Keywords bool `json:"keywords" url:"keywords,omitempty"` Method string `json:"method" url:"method,omitempty"` // Must be one of "sync" | "async" | "streaming" Model string `json:"model" url:"model,omitempty"` Multichannel bool `json:"multichannel" url:"multichannel,omitempty"` Ner bool `json:"ner" url:"ner,omitempty"` Numbers bool `json:"numbers" url:"numbers,omitempty"` Numerals bool `json:"numerals" url:"numerals,omitempty"` Paragraphs bool `json:"paragraphs" url:"paragraphs,omitempty"` ProfanityFilter bool `json:"profanity_filter" url:"profanity_filter,omitempty"` Punctuate bool `json:"punctuate" url:"punctuate,omitempty"` Redact bool `json:"redact" url:"redact,omitempty"` Replace bool `json:"replace" url:"replace,omitempty"` Search bool `json:"search" url:"search,omitempty"` Sentiment bool `json:"sentiment" url:"sentiment,omitempty"` SentimentThreshold float64 `json:"sentiment_threshold" url:"sentiment_threshold,omitempty"` SmartFormat bool `json:"smart_format" url:"smart_format,omitempty"` Start string `json:"start" url:"start,omitempty"` Summarize bool `json:"summarize" url:"summarize,omitempty"` Tag []string `json:"tag" url:"tag,omitempty"` Translate bool `json:"translate" url:"translate,omitempty"` Utterances bool `json:"utterances" url:"utterances,omitempty"` UttSplit bool `json:"utt_split" url:"utt_split,omitempty"` }
type UsageRequest ¶
type UsageRequest struct { RequestId string `json:"request_id" url:"request_id,omitempty"` Created string `json:"created" url:"created,omitempty"` Path string `json:"path" url:"path,omitempty"` Accessor string `json:"accessor" url:"accessor,omitempty"` Response interface{} `json:"response" url:"response,omitempty"` Callback interface{} `json:"callback" url:"callback,omitempty"` }
type UsageRequestList ¶
type UsageRequestListOptions ¶
type UsageResponseDetail ¶ added in v0.6.0
type UsageSummary ¶ added in v0.6.0
type UsageSummary struct { Start string `json:"start"` End string `json:"end"` Resolution interface{} `json:"resolution"` Results []UsageResponseDetail `json:"results"` }
Click to show internal directories.
Click to hide internal directories.