schema

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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" writer:",right,width:5"`
	Start       Timestamp `json:"start" writer:",right,width:5"`
	End         Timestamp `json:"end" writer:",right,width:5"`
	Text        string    `json:"text" writer:",wrap,width:70"`
	Speaker     string    `json:"speaker,omitempty" writer:",width:20"` // 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 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

Jump to

Keyboard shortcuts

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