Files
Cyrene_v2/internal/runtime/multimodal/voice/errors.go
T
AskaEth b0fbb8bc0d
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
docs(comments): 注释中文化 · internal/runtime/multimodal(21 文件,纯替换)
- 只翻注释/文档字符串,代码零变化:go/scanner 词法流比对 21 文件 token+字面量全等,增删行数 1:1(467/467)
- 刻意保留非散文英文:JSON Schema description、工具 Description() 返回值、adapter prompt、API 路径与命令示例、环境变量名
- 逐行确认代码前缀未变,未触碰其他模块
2026-10-04 12:28:16 +08:00

19 lines
782 B
Go

package voice
import "errors"
// voice 包返回的哨兵错误。每个错误都以 %w 包装,
// 使调用方能按类别判断,同时保留原始原因。
var (
// ErrProviderFailed 在一条链上所有提供方都失败时返回。
ErrProviderFailed = errors.New("voice: all providers failed")
// ErrNotConfigured 在提供方缺少 endpoint/配置项时返回。
ErrNotConfigured = errors.New("voice: provider not configured")
// ErrNotImplemented 由适配点提供方返回。
ErrNotImplemented = errors.New("voice: provider not implemented")
// ErrEmptyText 在 TTS 收到空文本时返回。
ErrEmptyText = errors.New("voice: empty text")
// ErrClosed 在 Close 之后仍有服务调用到达时返回。
ErrClosed = errors.New("voice: service closed")
)