voice

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	FileName string
	MIMEType string
	Data     []byte
}

Input 是一个要转录的音频负载。

type Transcriber

type Transcriber interface {
	Transcribe(ctx context.Context, input Input) (string, error)
}

Transcriber 将音频转换为文本。

func NewOpenAITranscriber

func NewOpenAITranscriber(apiKey, baseURL, model string, timeout time.Duration) (Transcriber, error)

NewOpenAITranscriber 构建一个 OpenAI 兼容的音频转录客户端。

Jump to

Keyboard shortcuts

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