Documentation
¶
Overview ¶
This package provides the types for the Deepgram PreRecorded API.
Index ¶
- func GetJson(resp *http.Response, target interface{}) error
- func SecondsToTimestamp(seconds float64) string
- type Alternative
- type Channel
- type Entity
- type Hit
- type Metadata
- type Paragraph
- type Paragraphs
- type PreRecordedResponse
- type Result
- type Search
- type Sentence
- type Summaries
- type Summary
- type SummaryV1
- type SummaryV2
- type Topic
- type Topics
- type Translation
- type Utterance
- type Warning
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecondsToTimestamp ¶
Types ¶
type Alternative ¶
type Alternative struct { Transcript string `json:"transcript,omitempty"` Confidence float64 `json:"confidence,omitempty"` Words []Word `json:"words,omitempty"` Paragraphs Paragraph `json:"paragraphs,omitempty"` Entities []Entity `json:"entities,omitempty"` Summaries []SummaryV1 `json:"summaries,omitempty"` Translation Translation `json:"translation,omitempty"` Topics []Topics `json:"topics,omitempty"` }
type Channel ¶
type Channel struct { Search []Search `json:"search,omitempty"` Alternatives []Alternative `json:"alternatives,omitempty"` DetectedLanguage string `json:"detected_language,omitempty"` LanguageConfidence float64 `json:"language_confidence,omitempty"` }
type Metadata ¶
type Metadata struct { TransactionKey string `json:"transaction_key,omitempty"` RequestID string `json:"request_id,omitempty"` Sha256 string `json:"sha256,omitempty"` Created string `json:"created,omitempty"` Duration float64 `json:"duration,omitempty"` Channels int `json:"channels,omitempty"` Models []string `json:"models,omitempty"` SummaryInfo struct { InputTokens int `json:"input_tokens,omitempty"` OutputTokens int `json:"output_tokens,omitempty"` ModelUUID string `json:"model_uuid,omitempty"` } `json:"summary_info,omitempty"` ModelInfo map[string]struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Arch string `json:"arch,omitempty"` } `json:"model_info,omitempty"` Warnings []Warning `json:"warnings,omitempty"` }
********************************* share/common structs *********************************
type Paragraphs ¶
type PreRecordedResponse ¶
type PreRecordedResponse struct { RequestID string `json:"request_id,omitempty"` // for ?callback=... Metadata Metadata `json:"metadata,omitempty"` Results Result `json:"results,omitempty"` }
********************************* response/result structs *********************************
func (*PreRecordedResponse) ToSRT ¶
func (resp *PreRecordedResponse) ToSRT() (string, error)
ToSRT implements output for SRT
func (*PreRecordedResponse) ToWebVTT ¶
func (resp *PreRecordedResponse) ToWebVTT() (string, error)
ToWebVTT implements output for VTT
type Translation ¶ added in v1.0.3
type Utterance ¶
type Utterance struct { Start float64 `json:"start,omitempty"` End float64 `json:"end,omitempty"` Confidence float64 `json:"confidence,omitempty"` Channel int `json:"channel,omitempty"` Transcript string `json:"transcript,omitempty"` Words []Word `json:"words,omitempty"` Speaker int `json:"speaker,omitempty"` ID string `json:"id,omitempty"` }
type Word ¶
type Word struct { Word string `json:"word,omitempty"` Start float64 `json:"start,omitempty"` End float64 `json:"end,omitempty"` Confidence float64 `json:"confidence,omitempty"` Speaker int `json:"speaker,omitempty"` SpeakerConfidence float64 `json:"speaker_confidence,omitempty"` PunctuatedWord string `json:"punctuated_word,omitempty"` }
Click to show internal directories.
Click to hide internal directories.