feat: 重构项目以符合 Go 规范,添加 OpenAI 接口适配,优化长文本朗读功能(切割后合并)
This commit is contained in:
15
internal/tts/service.go
Normal file
15
internal/tts/service.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user