deepgram

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey          string
	Model           string
	Language        string
	SampleRate      int
	Channels        int
	Encoding        string
	EnableKeepAlive bool
	UtteranceEndMs  string

	ClientFactory func(context.Context, string, *clientinterfaces.ClientOptions, *clientinterfaces.LiveTranscriptionOptions, wsinterfaces.LiveMessageCallback) (DeepgramClient, error)

	MuxerFactory speech_to_text.CreateMuxerFn
}

Config содержит конфигурацию для SpeechToText

func DefaultConfig

func DefaultConfig(APIKey string) Config

DefaultConfig возвращает конфигурацию по умолчанию

type DeepgramClient

type DeepgramClient interface {
	Connect() bool
	Stream(reader io.Reader) error
	Write(p []byte) (int, error)
}

type SpeechToText

type SpeechToText struct {
	// contains filtered or unexported fields
}

func New

func New(APIKey string, log *zap.Logger) *SpeechToText

New создает новый экземпляр SpeechToText с конфигурацией по умолчанию

func NewWithConfig

func NewWithConfig(config Config, log *zap.Logger) *SpeechToText

NewWithConfig создает новый экземпляр SpeechToText с указанной конфигурацией

func (*SpeechToText) Transcribe

func (a *SpeechToText) Transcribe(ctx context.Context, r <-chan pkg.AudioChunk) (<-chan pkg.SpeechChunk, error)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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