Documentation ¶
Index ¶
- Constants
- Variables
- func CreateSSML(text, voiceName string) string
- func CreateStyleSSML(text, voiceName, style string) string
- func GetAzureVoices() ([]byte, error)
- func TextToMp3(tts TTS, text string, ttsLang string, filePath string) error
- type AzureTTS
- type EdgeTTS
- func (t *EdgeTTS) CloseConn()
- func (t *EdgeTTS) GetAudio(ssml, format string) (audioData []byte, err error)
- func (t *EdgeTTS) GetAudioStream(ssml, format string, read func([]byte)) error
- func (t *EdgeTTS) NewConn() error
- func (t *EdgeTTS) TextToMp3(text string, ttsLang string, filePath string) error
- type TReadMessage
- type TTS
Constants ¶
View Source
const NormalSsmlTemplate = `` /* 301-byte string literal not displayed */
View Source
const StyleSsmlTemplate = `` /* 357-byte string literal not displayed */
Variables ¶
View Source
var EdgeTtsDict = map[string]string{
"用英语": "en-US-AriaNeural",
"用日语": "ja-JP-NanamiNeural",
"用法语": "fr-BE-CharlineNeural",
"用韩语": "ko-KR-SunHiNeural",
"用德语": "de-AT-JonasNeural",
}
Functions ¶
func CreateSSML ¶
func CreateStyleSSML ¶
func GetAzureVoices ¶
Types ¶
type AzureTTS ¶
type AzureTTS struct { DialTimeout time.Duration WriteTimeout time.Duration // contains filtered or unexported fields }
func (*AzureTTS) GetAudioStream ¶
type EdgeTTS ¶
type EdgeTTS struct { DnsLookupEnabled bool // 使用DNS解析,而不是北京微软云节点。 DialTimeout time.Duration WriteTimeout time.Duration // contains filtered or unexported fields }
func (*EdgeTTS) GetAudioStream ¶
type TReadMessage ¶
Click to show internal directories.
Click to hide internal directories.