deepgram

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 9 Imported by: 0

README

Deepgram Go SDK

This is a community driven SDK. There is minimal functionality on the SDK but we hope to add more features soon.

While we don't have a stable release, that is because we don't have feature parity with the other SDKs. It is safe to use, but not all features are available.

To process live transcriptions, see the example.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJson

func GetJson(resp *http.Response, target interface{}) error

func Init added in v0.2.1

func Init(apiKey string, host string, path string) *deepgram

Types

type BufferSource

type BufferSource struct {
	Buffer   bytes.Buffer `json:"buffer"`
	Mimetype string       `json:"mimetype"`
}

type InvitationList

type InvitationList struct {
	Invites []InvitationOptions `json:"invites"`
}

type InvitationOptions

type InvitationOptions struct {
	Email string `json:"email"`
	Scope string `json:"scope"`
}

type LiveTranscriptionOptions

type LiveTranscriptionOptions struct {
	Model            string      `json:"model" url:"model,omitempty" `
	Language         string      `json:"language" url:"language,omitempty" `
	Version          string      `json:"version" url:"version,omitempty" `
	Punctuate        bool        `json:"punctuate" url:"punctuate,omitempty" `
	Profanity_filter bool        `json:"profanity_filter" url:"profanity_filter,omitempty" `
	Redact           bool        `json:"redact" url:"redact,omitempty" `
	Diarize          interface{} `json:"diarize" url:"diarize,omitempty" `
	Multichannel     bool        `json:"multichannel" url:"multichannel,omitempty" `
	Alternatives     int         `json:"alternatives" url:"alternatives,omitempty" `
	Numerals         bool        `json:"numerals" url:"numerals,omitempty" `
	Search           []string    `json:"search" url:"search,omitempty" `
	Callback         string      `json:"callback" url:"callback,omitempty" `
	Keywords         []string    `json:"keywords" url:"keywords,omitempty" `
	Interim_results  bool        `json:"interim_results" url:"interim_results,omitempty" `
	Endpointing      bool        `json:"endpointing" url:"endpointing,omitempty" `
	Vad_turnoff      int         `json:"vad_turnoff" url:"vad_turnoff,omitempty" `
	Encoding         string      `json:"encoding" url:"encoding,omitempty" `
	Channels         int         `json:"channels" url:"channels,omitempty" `
	Sample_rate      int         `json:"sample_rate" url:"sample_rate,omitempty" `
	Tier             string      `json:"tier" url:"tier,omitempty" `
	Replace          string      `json:"replace" url:"replace,omitempty" `
}

type Message

type Message struct {
	Message string `json:"message"`
}

type PreRecordedResponse

type PreRecordedResponse struct {
	Request_id string      `json:"request_id"`
	Metadata   interface{} `json:"metadata"`
	Results    interface{} `json:"results"`
}

type PreRecordedTranscriptionOptions

type PreRecordedTranscriptionOptions struct {
	Tier             string      `json:"tier" url:"tier,omitempty" `
	Model            string      `json:"model" url:"model,omitempty" `
	Version          string      `json:"version" url:"version,omitempty" `
	Language         string      `json:"language" url:"language,omitempty" `
	Punctuate        bool        `json:"punctuate" url:"punctuate,omitempty" `
	Profanity_filter bool        `json:"profanity_filter" url:"profanity_filter,omitempty" `
	Redact           bool        `json:"redact" url:"redact,omitempty" `
	Diarize          interface{} `json:"diarize" url:"diarize,omitempty" `
	Ner              bool        `json:"ner" url:"ner,omitempty" `
	Multichannel     bool        `json:"multichannel" url:"multichannel,omitempty" `
	Alternatives     int         `json:"alternatives" url:"alternatives,omitempty" `
	Numerals         bool        `json:"numerals" url:"numerals,omitempty" `
	Search           []string    `json:"search" url:"search,omitempty" `
	Replace          string      `json:"replace" url:"replace,omitempty" `
	Callback         string      `json:"callback" url:"callback,omitempty" `
	Keywords         []string    `json:"keywords" url:"keywords,omitempty" `
	Utterances       bool        `json:"utterances" url:"utterances,omitempty" `
	Utt_split        int         `json:"utt_split" url:"utt_split,omitempty" `
	Tag              string      `json:"tag" url:"tag,omitempty"`
}

type ReadStreamSource

type ReadStreamSource struct {
	Stream   io.Reader `json:"stream"`
	Mimetype string    `json:"mimetype"`
}

type TranscriptionSource

type TranscriptionSource interface {
	ReadStreamSource | UrlSource | BufferSource
}

type UrlSource

type UrlSource struct {
	Url string `json:"url"`
}

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 UsageRequestList struct {
	Page     int         `json:"page" url:"page,omitempty"`
	Limit    int         `json:"limit" url:"limit,omitempty"`
	Requests interface{} `json:"requests" url:"requests,omitempty"`
}

type UsageRequestListOptions

type UsageRequestListOptions struct {
	Start  string `json:"start" url:"start,omitempty"`
	End    string `json:"end" url:"end,omitempty"`
	Page   int    `json:"page" url:"page,omitempty"`
	Limit  int    `json:"limit" url:"limit,omitempty"`
	Status string `json:"status" url:"status,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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