Documentation ¶
Index ¶
- Constants
- func GetProxyByOption(opts []Option) string
- func GetRateByOption(opts []Option) string
- func GetVoiceByOption(opts []Option) string
- func GetVolumeByOption(opts []Option) string
- func PrintVoices(proxy string)
- type AudioData
- type Communicate
- type NoAudioReceived
- type Option
- type UnexpectedResponse
- type UnknownResponse
- type WebSocketError
Constants ¶
View Source
const ( WssURL = "wss://speech.platform.bing.com/consumer/speech/synthesize/" + "readaloud/edge/v1?TrustedClientToken=" + trustedClientToken VoiceList = "https://speech.platform.bing.com/consumer/speech/synthesize/" + "readaloud/voices/list?trustedclienttoken=" + trustedClientToken )
Variables ¶
This section is empty.
Functions ¶
func GetProxyByOption ¶
func GetRateByOption ¶
func GetVoiceByOption ¶
func GetVolumeByOption ¶
func PrintVoices ¶
func PrintVoices(proxy string)
Types ¶
type Communicate ¶
type Communicate struct { Text string Voice string VoiceLangRegion string Rate string Volume string Proxy string AudioDataIndex int // contains filtered or unexported fields }
func NewCommunicate ¶
func NewCommunicate(text string, opts ...Option) (*Communicate, error)
func (*Communicate) CloseOutput ¶
func (c *Communicate) CloseOutput()
func (*Communicate) Stream ¶
func (c *Communicate) Stream() (<-chan map[string]interface{}, error)
type NoAudioReceived ¶
type NoAudioReceived struct {
Message string
}
type Option ¶
type Option struct { OptID optionID Param string }
func WithVoice ¶
WithVoice get voice config here: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=tts
func WithVolume ¶
type UnexpectedResponse ¶
type UnexpectedResponse struct {
Message string
}
type UnknownResponse ¶
type UnknownResponse struct {
Message string
}
type WebSocketError ¶
type WebSocketError struct {
Message string
}
Click to show internal directories.
Click to hide internal directories.