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
- func (c *Client) WithTranscriptionPath(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 ParagraphBase
- type ParagraphGroup
- type PreRecordedResponse
- type PreRecordedTranscriptionOptions
- type Project
- type ProjectResponse
- type ProjectUpdateOptions
- type ReadStreamSource
- type Results
- type ScopeList
- type Search
- type SentenceBase
- type SummaryV1
- type SummaryV2
- type Topic
- type TopicBase
- type TranscriptionSource
- type UrlSource
- type UsageOptions
- type UsageRequest
- type UsageRequestList
- type UsageRequestListOptions
- type UsageResponseDetail
- type UsageSummary
- type Utterance
- type Warning
- type WordBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecondsToTimestamp ¶
Types ¶
type Alternative ¶
type Alternative struct {
Transcript string `json:"transcript"`
Confidence float64 `json:"confidence"`
Words []WordBase `json:"words"`
Summaries []*SummaryV1 `json:"summaries,omitempty"`
Paragraphs *ParagraphGroup `json:"paragraphs,omitempty"`
Topics []*TopicBase `json:"topics,omitempty"`
Entities []*EntityBase `json:"entities,omitempty"`
}
type BalanceList ¶
type BalanceList struct {
Balances []Balance `json:"balances"`
}
type BufferSource ¶
type Channel ¶
type Channel struct {
Search []*Search `json:"search,omitempty"`
Alternatives []Alternative `json:"alternatives"`
DetectedLanguage string `json:"detected_language,omitempty"`
}
type Client ¶
func (*Client) DeleteInvitation ¶
func (*Client) GetBalance ¶
func (*Client) GetFields ¶
func (dg *Client) GetFields(projectId string, options UsageRequestListOptions) (interface{}, error)
func (*Client) GetKey ¶
func (dg *Client) GetKey(projectId string, keyId string) (KeyResponseObj, error)
func (*Client) GetMemberScopes ¶
func (*Client) GetRequest ¶
func (dg *Client) GetRequest(projectId string, requestId string) (UsageRequest, error)
func (*Client) GetUsage ¶
func (dg *Client) GetUsage(projectId string, options UsageOptions) (UsageSummary, error)
func (*Client) ListBalances ¶
func (dg *Client) ListBalances(projectId string) (BalanceList, error)
func (*Client) ListInvitations ¶
func (dg *Client) ListInvitations(projectId string) (InvitationList, error)
func (*Client) ListMembers ¶
func (dg *Client) ListMembers(projectId string) (MemberList, error)
func (*Client) ListProjects ¶
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 ¶
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 ¶
func (*Client) SendInvitation ¶
func (dg *Client) SendInvitation(projectId string, options InvitationOptions) (Message, error)
func (*Client) UpdateMemberScopes ¶
func (*Client) UpdateProject ¶
func (dg *Client) UpdateProject(projectId string, options ProjectUpdateOptions) (Message, error)
func (*Client) WithTranscriptionPath ¶ added in v0.10.0
type CreateKeyOptions ¶
type CreateKeyRequest ¶
type EntityBase ¶
type InvitationList ¶
type InvitationList struct {
Invites []InvitationOptions `json:"invites"`
}
type InvitationOptions ¶
type KeyResponse ¶
type KeyResponse struct {
ApiKeys []KeyResponseObj `json:"api_keys"`
}
type KeyResponseObj ¶
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" `
Smart_format bool `json:"smart_format" url:"smart_format,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" `
FillerWords string `json:"filler_words" url:"filler_words,omitempty" `
}
type MemberList ¶
type MemberList struct {
Members []Member `json:"members"`
}
type MemberScope ¶
type MemberScope struct {
Scope string `json:"scope"`
}
type Metadata ¶
type Metadata struct {
TransactionKey string `json:"transaction_key"`
RequestId string `json:"request_id"`
Sha256 string `json:"sha256"`
Created string `json:"created"`
Duration float64 `json:"duration"`
Channels int `json:"channels"`
Models []string `json:"models"`
ModelInfo map[string]struct {
Name string `json:"name"`
Version string `json:"version"`
Arch string `json:"arch"`
} `json:"model_info"`
Warnings []*Warning `json:"warnings,omitempty"`
}
type ParagraphBase ¶ added in v0.10.0
type ParagraphBase struct {
Sentences []SentenceBase `json:"sentences"`
NumWords int `json:"num_words"`
Start float64 `json:"start"`
End float64 `json:"end"`
}
type ParagraphGroup ¶ added in v0.10.0
type ParagraphGroup struct {
Transcript string `json:"transcript"`
Paragraphs []ParagraphBase `json:"paragraphs"`
}
type PreRecordedResponse ¶
type PreRecordedResponse struct {
Request_id string `json:"request_id,omitempty"`
Metadata Metadata `json:"metadata"`
Results Results `json:"results"`
}
func (*PreRecordedResponse) ToSRT ¶
func (resp *PreRecordedResponse) ToSRT() (string, error)
func (*PreRecordedResponse) ToWebVTT ¶
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" `
SmartFormat bool `json:"smart_format" url:"smart_format,omitempty" `
Summarize interface{} `json:"summarize" url:"summarize,omitempty" ` // bool | string
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 float64 `json:"utt_split" url:"utt_split,omitempty" `
Version string `json:"version" url:"version,omitempty" `
FillerWords string `json:"filler_words" url:"filler_words,omitempty" `
}
type ProjectResponse ¶
type ProjectResponse struct {
Projects []Project `json:"projects"`
}
type ProjectUpdateOptions ¶
type ReadStreamSource ¶
type SentenceBase ¶ added in v0.10.0
type TranscriptionSource ¶
type TranscriptionSource interface {
ReadStreamSource | UrlSource | BufferSource
}
type UsageOptions ¶
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 ¶
type UsageSummary ¶
type UsageSummary struct {
Start string `json:"start"`
End string `json:"end"`
Resolution interface{} `json:"resolution"`
Results []UsageResponseDetail `json:"results"`
}
type WordBase ¶
type WordBase struct {
Word string `json:"word"`
Start float64 `json:"start"`
End float64 `json:"end"`
Confidence float64 `json:"confidence"`
Speaker *int `json:"speaker,omitempty"`
SpeakerConfidence float64 `json:"speaker_confidence,omitempty"`
Punctuated_Word string `json:"punctuated_word,omitempty"`
Sentiment string `json:"sentiment,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.