subtitles

package
v0.0.0-...-6d978cb Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	FileName string
	Data     io.Reader
	Language string // For now, we have the transcription language hardcoded to Portuguese.
}

Input represents the input to the subtitle generator.

type Subtitler

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

Subtitler is the subtitle generator.

func New

func New(
	logger *slog.Logger,
	sampleRate, outputDir, tmpDir string,
	stripper audioStripper,
	whisperCli whisperClient,
) (*Subtitler, error)

New returns a new subtitle generator.

func (*Subtitler) GenerateFromAudioData

func (s *Subtitler) GenerateFromAudioData(ctx context.Context, inputs []*Input) error

GenerateFromAudioData generates subtitle from audio data.

Jump to

Keyboard shortcuts

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