Documentation ¶
Index ¶
- type ChatService
- type FileService
- type TxAsrService
- type TxTtsService
- func (t *TxTtsService) HandleText2Audio(text string, volume, speed, voiceType int, emotionCategory string, ...) string
- func (t *TxTtsService) HandleText2Audio2(text string, volume, speed, voiceType int, emotionCategory string, ...) (response *tts.TextToVoiceResponse, err error)
- func (t *TxTtsService) SaveToFile(base64Str *string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
func NewChatService ¶
func NewChatService(chatToken string) *ChatService
func (*ChatService) HandleChat ¶
func (p *ChatService) HandleChat(name, content string) string
func (*ChatService) HandleChat2 ¶
func (p *ChatService) HandleChat2(content string) (openai.ChatCompletionResponse, error)
type FileService ¶
type FileService struct { }
func NewFileService ¶
func NewFileService() *FileService
func (*FileService) LoadFile ¶
func (service *FileService) LoadFile(w io.Writer, filename string) error
func (*FileService) SaveToLocal ¶
func (service *FileService) SaveToLocal(file io.Reader, filename string) error
type TxAsrService ¶
type TxAsrService struct {
// contains filtered or unexported fields
}
func NewTxAsrService ¶
func NewTxAsrService(host, port, secretId, secretKey string) *TxAsrService
func (*TxAsrService) HandleSentenceRecognition ¶
func (t *TxAsrService) HandleSentenceRecognition(filename, format string) (string, error)
func (*TxAsrService) HandleSentenceRecognition2 ¶
func (t *TxAsrService) HandleSentenceRecognition2(filename, format string) (response *asr.SentenceRecognitionResponse, err error)
type TxTtsService ¶
type TxTtsService struct {
// contains filtered or unexported fields
}
func NewTxTtsService ¶
func NewTxTtsService(secretId, secretKey string) *TxTtsService
func (*TxTtsService) HandleText2Audio ¶
func (*TxTtsService) HandleText2Audio2 ¶
func (t *TxTtsService) HandleText2Audio2(text string, volume, speed, voiceType int, emotionCategory string, emotionIntensity int) (response *tts.TextToVoiceResponse, err error)
func (*TxTtsService) SaveToFile ¶
func (t *TxTtsService) SaveToFile(base64Str *string) string
Click to show internal directories.
Click to hide internal directories.