api

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteModelById

func DeleteModelById(ctx context.Context, w http.ResponseWriter, service *whisper.Whisper, id string)

func DownloadModel

func DownloadModel(ctx context.Context, w http.ResponseWriter, r *http.Request, service *whisper.Whisper)

func GetModelById

func GetModelById(ctx context.Context, w http.ResponseWriter, service *whisper.Whisper, id string)

func ListModels

func ListModels(ctx context.Context, w http.ResponseWriter, service *whisper.Whisper)

func RegisterEndpoints

func RegisterEndpoints(base string, whisper *whisper.Whisper, mux *http.ServeMux) *http.ServeMux

func TranscribeFile

func TranscribeFile(ctx context.Context, service *whisper.Whisper, w http.ResponseWriter, r *http.Request, t TaskType)

Types

type ResponseFormat added in v0.0.18

type ResponseFormat string
const (
	FormatJson        ResponseFormat = "json"
	FormatText        ResponseFormat = "text"
	FormatSrt         ResponseFormat = "srt"
	FormatVerboseJson ResponseFormat = "verbose_json"
	FormatVtt         ResponseFormat = "vtt"
)

type TaskType added in v0.0.18

type TaskType int
const (
	Transcribe TaskType // Transcribe audio
	Translate           // Translate text
	Diarize             // Diarize audio
)

Jump to

Keyboard shortcuts

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