edge

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 GetProxyByOption(opts []Option) string

func GetRateByOption

func GetRateByOption(opts []Option) string

func GetVoiceByOption

func GetVoiceByOption(opts []Option) string

func GetVolumeByOption

func GetVolumeByOption(opts []Option) string

Types

type AudioData

type AudioData struct {
	Data  []byte
	Index int
}

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 WithProxy

func WithProxy(voice string) Option

func WithRate

func WithRate(voice string) Option

func WithVolume

func WithVolume(voice string) Option

type UnexpectedResponse

type UnexpectedResponse struct {
	Message string
}

type UnknownResponse

type UnknownResponse struct {
	Message string
}

type WebSocketError

type WebSocketError struct {
	Message string
}

Jump to

Keyboard shortcuts

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