communicate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Communicate

type Communicate struct {
	Voice           string
	VoiceLangRegion string
	Pitch           string
	Rate            string
	Volume          string

	IgnoreSSLVerification bool
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Communicate

func (*Communicate) GenerateVoice

func (c *Communicate) GenerateVoice(text string) ([]byte, error)

GenerateVoice generate the voice

func (*Communicate) GenerateVoiceStreamTo

func (c *Communicate) GenerateVoiceStreamTo(text string, target io.Writer) error

type Option

type Option func(option *Communicate)

func WithPitch

func WithPitch(pitch string) Option

WithPitch set pitch of the tts output.such as +50Hz,-50Hz

func WithRate

func WithRate(rate string) Option

WithRate set rate of the tts output.rate=-50% means rate down 50%,rate=+50% means rate up 50%

func WithVoice

func WithVoice(voice string) Option

func WithVoiceLangRegion

func WithVoiceLangRegion(voiceLangRegion string) Option

func WithVolume

func WithVolume(volume string) Option

WithVolume set volume of the tts output.volume=-50% means volume down 50%,volume=+50% means volume up 50%

Jump to

Keyboard shortcuts

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