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 ¶
DefaultConfig возвращает конфигурацию по умолчанию
type DeepgramClient ¶
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)