Documentation
¶
Overview ¶
This package contains the interface to manage the prerecorded interfaces for the Deepgram API
This package contains the interface to manage the live/streaming interfaces for the Deepgram API
Index ¶
- Variables
- func WithCustomHeaders(ctx context.Context, headers http.Header) context.Context
- func WithCustomParameters(ctx context.Context, params map[string][]string) context.Context
- func WithSigner(ctx context.Context, s Signer) context.Context
- type HeadersContext
- type LiveTranscriptionOptions
- type ParametersContext
- type PreRecordedTranscriptionOptions
- type RawResponse
- type Signer
- type SignerContext
- type StatusError
Constants ¶
This section is empty.
Variables ¶
var DgAgent string = "@deepgram/sdk/" + sdkVersion + " go/" + goVersion()
connection agent
Functions ¶
func WithCustomHeaders ¶
WithCustomHeaders appends a header to the given context
func WithCustomParameters ¶
WithCustomParameters
Types ¶
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" `
Diarize bool `json:"diarize" url:"diarize,omitempty" `
Diarize_version string `json:"diarize_version" url:"diarize_version,omitempty" `
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" `
Language string `json:"language" url:"language,omitempty" `
Model string `json:"model" url:"model,omitempty" `
Multichannel bool `json:"multichannel" url:"multichannel,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 []string `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" `
Version string `json:"version" url:"version,omitempty" `
FillerWords string `json:"filler_words" url:"filler_words,omitempty" `
}
LiveTranscriptionOptions contain all of the knobs and dials to control the live transcription from the Deepgram API
Please see the documentation for live/streaming for more details: https://developers.deepgram.com/reference/streaming
type PreRecordedTranscriptionOptions ¶
type PreRecordedTranscriptionOptions struct {
Alternatives int `json:"alternatives" url:"alternatives,omitempty" `
Callback string `json:"callback" url:"callback,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" `
Diarize_version string `json:"diarize_version" url:"diarize_version,omitempty" `
Keywords []string `json:"keywords" url:"keywords,omitempty" `
Language string `json:"language" url:"language,omitempty" `
Model string `json:"model" url:"model,omitempty" `
Multichannel bool `json:"multichannel" url:"multichannel,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 []string `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" `
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" `
}
PreRecordedTranscriptionOptions contain all of the knobs and dials to control a Prerecorded transcription from the Deepgram API
Please see the documentation for live/streaming for more details: https://developers.deepgram.com/reference/pre-recorded
type RawResponse ¶
RawResponse may be used with the Do method as the resBody argument in order to capture the raw response data.
type StatusError ¶
StatusError captures a REST error in the library
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Error string representation for a given error