Documentation ¶
Index ¶
- Constants
- func GetProxyByOption(opts []Option) string
- func GetRateByOption(opts []Option) string
- func GetVoiceByOption(opts []Option) string
- func GetVolumeByOption(opts []Option) string
- type AudioData
- type Communicate
- type MessageType
- type NoAudioReceived
- type Option
- type UnexpectedResponse
- type UnknownResponse
- type WebSocketError
Constants ¶
View Source
const ( TrustedClientToken = "6A5AA1D4EAFF4E9FB37E23D68491D6F4" WssURL = "wss://speech.platform.bing.com/consumer/speech/synthesize/" + "readaloud/edge/v1?TrustedClientToken=" + TrustedClientToken )
Variables ¶
This section is empty.
Functions ¶
func GetProxyByOption ¶
func GetRateByOption ¶
func GetVoiceByOption ¶
func GetVolumeByOption ¶
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 MessageType ¶
type MessageType int
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.