tts

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpeechSynthesisListener

type SpeechSynthesisListener interface {
	OnMessage(*SpeechSynthesisResponse)
	OnComplete(*SpeechSynthesisResponse)
	OnCancel(*SpeechSynthesisResponse)
	OnFail(*SpeechSynthesisResponse, error)
}

SpeechSynthesisListener is the listener of

type SpeechSynthesisResponse

type SpeechSynthesisResponse struct {
	SessionID string
	Data      []byte
}

SpeechSynthesisResponse SpeechSynthesisResponse

type SpeechSynthesizer

type SpeechSynthesizer struct {
	AppID      int64
	Credential *common.Credential
	VoiceType  int64
	SampleRate int64
	Codec      string

	ProxyURL string
	// contains filtered or unexported fields
}

SpeechSynthesizer is the entry for TTS service

func NewSpeechSynthesizer

func NewSpeechSynthesizer(appID int64, credential *common.Credential, listener SpeechSynthesisListener) *SpeechSynthesizer

NewSpeechSynthesizer creates instance of SpeechSynthesizer

func (*SpeechSynthesizer) Cancel

func (synthesizer *SpeechSynthesizer) Cancel() error

Cancel Cancel

func (*SpeechSynthesizer) Synthesis

func (synthesizer *SpeechSynthesizer) Synthesis(text string) error

Synthesis Synthesis

func (*SpeechSynthesizer) Wait

func (synthesizer *SpeechSynthesizer) Wait() error

Wait Wait

Jump to

Keyboard shortcuts

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