speech_to_text

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Whisper

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

func NewWhisper

func NewWhisper(bibleId string, conn db.DBAdapter, model string, lang2 string) Whisper

func (*Whisper) ChopByTimestamp

func (w *Whisper) ChopByTimestamp(file input.InputFile, timestamps []db.Timestamp) ([]db.Timestamp, *log.Status)

func (*Whisper) ProcessFiles

func (w *Whisper) ProcessFiles(files []input.InputFile) *log.Status

func (*Whisper) RunWhisper

func (w *Whisper) RunWhisper(audioFile string) (string, *log.Status)

type WhisperOutputType

type WhisperOutputType struct {
	Segments []WhisperSegmentType `json:"segments"`
	Language string               `json:"language"`
}

type WhisperSegmentType

type WhisperSegmentType struct {
	Id               int           `json:"id"`
	Seek             float64       `json:"seek"`
	Start            float64       `json:"start"`
	End              float64       `json:"end"`
	Text             string        `json:"text"`
	Tokens           []int         `json:"tokens"`
	Temperature      float32       `json:"temperature"`
	AvgLogProb       float64       `json:"avg_logprob"`
	CompressionRatio float64       `json:"compression_ratio"`
	NoSpeechProb     float64       `json:"no_speech_prob"`
	Words            []WhisperWord `json:"words"`
}

type WhisperWord

type WhisperWord struct {
	Word  string  `json:"word"`
	Start float64 `json:"start"`
	End   float64 `json:"end"`
	Prob  float64 `json:"probability"`
}

Jump to

Keyboard shortcuts

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