schema

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 1 package

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

View Source
const (
	DownloadStreamProgressType = "download.progress"
	DownloadStreamErrorType    = "download.error"
	DownloadStreamDoneType     = "download.done"
)
View Source
const (
	TranscribeStreamDeltaType    = "transcript.text.delta"
	TranscribeStreamDoneType     = "transcript.text.done"
	TranscribeStreamErrorType    = "transcript.text.error"
	TranscribeStreamLanguageType = "transcript.text.language"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadModelRequest added in v0.0.26

type DownloadModelRequest struct {
	Model string `json:"model" help:"Model ID to download"`
}

DownloadModelRequest represents a request to download a model

func (*DownloadModelRequest) String added in v0.0.26

func (r *DownloadModelRequest) String() string

type Event added in v0.0.26

type Event struct {
	Type  string          `json:"type"`
	Delta string          `json:"delta,omitempty"` // transcript.text.delta
	Text  string          `json:"text,omitempty"`  // transcript.text.done and transcript.text.language
	JSON  json.RawMessage `json:"json,omitempty"`  // transcript.text.delta and transcript.text.done when format = json or verbose_json
}

func (Event) String added in v0.0.26

func (e Event) String() string

type Model

type Model struct {
	Id      string `json:"id" writer:",width:28,wrap"`
	Object  string `json:"object,omitempty" writer:"-"`
	Path    string `json:"path,omitempty" writer:",width:40,wrap"`
	Created int64  `json:"created,omitempty"`
	OwnedBy string `json:"owned_by,omitempty"`
}

func (*Model) String

func (m *Model) String() string

type Segment

type Segment struct {
	Id          int32     `json:"id"`
	Start       Timestamp `json:"start"`
	End         Timestamp `json:"end"`
	Text        string    `json:"text"`
	Tokens      []string  `json:"tokens,omitempty"`       // TODO
	Speaker     string    `json:"speaker,omitempty"`      // TODO
	SpeakerTurn bool      `json:"speaker_turn,omitempty"` // TODO
}

func (*Segment) String

func (s *Segment) String() string

func (*Segment) WriteSRT added in v0.0.23

func (seg *Segment) WriteSRT(w io.Writer, offset time.Duration)

func (*Segment) WriteText added in v0.0.23

func (seg *Segment) WriteText(w io.Writer)

func (*Segment) WriteVTT added in v0.0.23

func (seg *Segment) WriteVTT(w io.Writer, offset time.Duration)

type Timestamp

type Timestamp time.Duration

func SecToTimestamp added in v0.0.23

func SecToTimestamp(sec float64) Timestamp

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) UnmarshalJSON added in v0.0.23

func (t *Timestamp) UnmarshalJSON(data []byte) error

type TranscribeMultipartRequest added in v0.0.26

type TranscribeMultipartRequest struct {
	TranscribeRequest
	Audio gomultipart.File `json:"audio"`
}

TranscribeMultipartRequest wraps TranscribeRequest with an audio file for multipart form handling

type TranscribeRequest added in v0.0.26

type TranscribeRequest struct {
	TranslateRequest
	Language *string `json:"language,omitempty" help:"Language of the audio (two-letter code)"`
}

TranscribeRequest represents a request to transcribe audio

func (*TranscribeRequest) String added in v0.0.26

func (r *TranscribeRequest) String() string

type Transcription

type Transcription struct {
	Task     string     `json:"task,omitempty"`
	Language string     `json:"language,omitempty" writer:",width:8"`
	Duration Timestamp  `json:"duration,omitempty" writer:",width:8,right"`
	Text     string     `json:"text,omitempty" writer:",width:60,wrap"`
	Segments []*Segment `json:"segments,omitempty" writer:",width:40,wrap"`
}

func (*Transcription) String

func (t *Transcription) String() string

type TranslateMultipartRequest added in v0.0.26

type TranslateMultipartRequest struct {
	TranslateRequest
	Audio gomultipart.File `json:"audio"`
}

TranslateMultipartRequest wraps TranslateRequest with an audio file for multipart form handling

type TranslateRequest added in v0.0.26

type TranslateRequest struct {
	Model       string   `json:"model" help:"Model ID to use for translation"`
	Prompt      *string  `json:"prompt,omitempty" help:"Text to guide the model's style"`
	Temperature *float64 `json:"temperature,omitempty" help:"Sampling temperature (0-1)"`
	Stream      *bool    `json:"stream,omitempty" help:"Enable streaming response"`
	Diarize     *bool    `json:"diarize,omitempty" help:"Identify and separate speakers"`
	Filename    *string  `json:"filename,omitempty" help:"Optional filename with extension for the audio file"`
}

TranslateRequest represents a request to translate audio to English

func (*TranslateRequest) String added in v0.0.26

func (r *TranslateRequest) String() string

Jump to

Keyboard shortcuts

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