synthesizer

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package synthesizer implements the AWS Transcribe streaming ASR adapter for ling-base.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSASR

type AWSASR struct {
	Handler interface{}
	// contains filtered or unexported fields
}

AWSASR is the AWS Transcribe streaming ASR engine.

func NewAWSASR

func NewAWSASR(opt AWSASROption) *AWSASR

NewAWSASR builds an AWS Transcribe ASR engine.

func (*AWSASR) Activity

func (a *AWSASR) Activity() bool

func (*AWSASR) ConnAndReceive

func (a *AWSASR) ConnAndReceive(dialogID string) error

func (*AWSASR) Init

func (a *AWSASR) Init(tr base.ResultFunc, er base.ErrorFunc)

func (*AWSASR) RestartClient

func (a *AWSASR) RestartClient()

func (*AWSASR) SendAudioBytes

func (a *AWSASR) SendAudioBytes(data []byte) error

func (*AWSASR) SendEnd

func (a *AWSASR) SendEnd() error

func (*AWSASR) StopConn

func (a *AWSASR) StopConn() error

func (*AWSASR) Vendor

func (a *AWSASR) Vendor() string

type AWSASROption

type AWSASROption struct {
	AccessKey     string `json:"accessKey" yaml:"access_key"`
	SecretKey     string `json:"secretKey" yaml:"secret_key"`
	Region        string `json:"region" yaml:"region" default:"us-east-1"`
	SampleRate    int    `json:"sampleRate" yaml:"sample_rate" default:"16000"`
	AudioEncoding string `json:"audioEncoding" yaml:"audio_encoding" default:"pcm"`
	LanguageCode  string `json:"languageCode" yaml:"language_code" default:"en-US"`
	ReqChanSize   int    `json:"reqChanSize" yaml:"req_chan_size" default:"128"`
	VocabName     string `json:"vocabName" yaml:"vocab_name"`
	VocabMethod   string `json:"vocabMethod" yaml:"vocab_method"`
}

AWSASROption configures the AWS Transcribe ASR engine.

func NewAWSASROption

func NewAWSASROption(accessKey, secretKey, region string) AWSASROption

NewAWSASROption creates a default AWSASROption.

func (*AWSASROption) GetVendor

func (opt *AWSASROption) GetVendor() base.Vendor

GetVendor returns the vendor identifier.

Jump to

Keyboard shortcuts

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