asr

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConvertOptions = ConvertOptions{
	Format:   "srt",
	Interval: 30.0,
}

DefaultConvertOptions 默认转换选项

Functions

func ConvertToSubtitle

func ConvertToSubtitle(inputFile string, opts ...ConvertOptions) error

ConvertToSubtitle 快捷转换方法

Types

type BcutASR

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

func New

func New(ctx context.Context, cookie ...string) *BcutASR

func (*BcutASR) CreateTask

func (b *BcutASR) CreateTask() (string, error)

func (*BcutASR) QueryResult

func (b *BcutASR) QueryResult() (*types.ASRResult, error)

func (*BcutASR) SetData

func (b *BcutASR) SetData(filePath string) error

func (*BcutASR) Upload

func (b *BcutASR) Upload() error

func (*BcutASR) WithProgress

func (b *BcutASR) WithProgress(callback types.ProgressCallback) *BcutASR

type ConvertOptions

type ConvertOptions struct {
	Format     string                 // 输出格式,默认 "srt"
	Interval   float64                // 轮询间隔(秒),默认 30.0
	Progress   types.ProgressCallback // 进度回调,可选
	OutputPath string                 // 输出路径,可选,默认与输入文件同目录
	Context    context.Context        // 上下文,可选,用于取消操作
}

ConvertOptions 转换选项

Jump to

Keyboard shortcuts

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