modules

package
v0.0.0-...-e506182 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbairASR

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

AbairASR is used to call Abair Speech API for recognition. For initialization, use NewAbairASR().

func NewAbairASR

func NewAbairASR() (AbairASR, error)

NewAbairASR creates a new AbairASR after first initializing some stuff

func (AbairASR) Process

func (aASR AbairASR) Process(config protocol.ASRConfig, audioPath string, chunk protocol.Chunk) (protocol.ASROutput, error)

func Process() { Process runs Abair ASR on each part of the file as specified in the `chunks` input. If the chunk list is empty, the whole file will be processed.

type AsrRequest

type AsrRequest struct {
	RecogniseBlob string `json:"recogniseBlob"`
	Method        string `json:"method"`
	Developer     bool   `json:"developer"`
}

type AsrResponse

type AsrResponse struct {
	AudioFilePath  string          `json:"audioFilePath"`
	Transcriptions []Transcription `json:"transcriptions"`
	Duration       float64         `json:"duration"`
}

type GoogleASR

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

GoogleASR is used to call Google's Speech API for recognition. For initialization, use NewGoogleASR().

func NewGoogleASR

func NewGoogleASR(credentialsFile string) (GoogleASR, error)

NewGoogleASR creates a new GoogleASR after first initializing some stuff

func (GoogleASR) Initialised

func (gASR GoogleASR) Initialised() bool

func (GoogleASR) Process

func (gASR GoogleASR) Process(config protocol.ASRConfig, audioPath string, chunk protocol.Chunk) (protocol.ASROutput, error)

Process runs Google ASR on each part of the file as specified in the `chunks` input. If the chunk list is empty, the whole file will be processed.

type SttsASR

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

SttsASR is used to call Stts Speech API for recognition. For initialization, use NewSttsASR().

func NewSttsASR

func NewSttsASR() (SttsASR, error)

NewSttsASR creates a new SttsASR after first initializing some stuff

func (SttsASR) Process

func (aASR SttsASR) Process(config protocol.ASRConfig, audioPath string, chunk protocol.Chunk) (protocol.ASROutput, error)

func Process() { Process runs Stts ASR on each part of the file as specified in the `chunks` input. If the chunk list is empty, the whole file will be processed.

type SttsAsrRequest

type SttsAsrRequest struct {
	RecogniseBlob string `json:"recogniseBlob"`
}

type SttsAsrResponse

type SttsAsrResponse struct {
	AudioFilePath  string              `json:"audioFilePath"`
	Transcriptions []SttsTranscription `json:"transcriptions"`
	Duration       float64             `json:"duration"`
}

type SttsTranscription

type SttsTranscription struct {
	Utterance string `json:"utterance"`
}

type Transcription

type Transcription struct {
	Utterance string `json:"utterance"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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