service

package
v0.0.0-...-227a544 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 (t *TxTtsService) HandleText2Audio(text string, volume, speed, voiceType int, emotionCategory string, emotionIntensity int) string

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

Jump to

Keyboard shortcuts

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