feat: 重构项目以符合 Go 规范,添加 OpenAI 接口适配,优化长文本朗读功能(切割后合并)

This commit is contained in:
王锦强
2025-03-09 13:02:28 +08:00
parent 539f6d9ef5
commit 8f2fd68ebe
31 changed files with 2487 additions and 647 deletions

15
internal/tts/service.go Normal file
View File

@@ -0,0 +1,15 @@
package tts
import (
"context"
"tts/internal/models"
)
// Service 定义TTS服务接口
type Service interface {
// ListVoices 获取可用的语音列表
ListVoices(ctx context.Context, locale string) ([]models.Voice, error)
// SynthesizeSpeech 将文本转换为语音
SynthesizeSpeech(ctx context.Context, req models.TTSRequest) (*models.TTSResponse, error)
}