api

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileData

type FileData struct {
	Name    string
	Content []byte
}

FileData contains name and data

type StatusData

type StatusData struct {
	ID             string
	Text           string
	Completed      bool
	ErrorCode      string
	Error          string
	Status         string
	Progress       int
	AudioReady     bool
	AvResults      []string
	RecognizedText string `json:"recognizedText,omitempty"`
}

StatusData keeps structure for status method

type Transcriber

type Transcriber interface {
	Upload(ctx context.Context, audioFunc func(context.Context) (*UploadData, func(), error)) (string, error)
	HookToStatus(ctx context.Context, ID string) (<-chan StatusData, func(), error)
	GetStatus(ctx context.Context, ID string) (*StatusData, error)
	GetAudio(ctx context.Context, ID string) (*FileData, error)
	GetResult(ctx context.Context, ID, name string) (*FileData, error)
	Clean(ctx context.Context, ID string) error
}

Transcriber provides transcription

type UploadData

type UploadData struct {
	Params map[string]string
	Files  map[string]io.Reader
}

UploadData keeps structure for upload method

Jump to

Keyboard shortcuts

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