tts_http

package module
v0.0.0-...-18b40f7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = logr.New()

Functions

This section is empty.

Types

type SynthesisRequest

type SynthesisRequest struct {
	Text string `json:"text"`
}

Data format that the http endpoint must accept

type SynthesizeResponse

type SynthesizeResponse struct {
	// This must be base64 encoded float32 little endian binary data
	Data         string `json:"data"`
	SampleRate   int    `json:"sample_rate"`
	ChannelCount int    `json:"channel_count"`
}

Data format that the http endpoint must return

type TTSHttpBackend

type TTSHttpBackend struct {
	// contains filtered or unexported fields
}

TTSHttpBackend conforms to the engine.Synthesizer interface and posts text to a remote server for TTS. It expects the server to return a valid SynthesizeResponse with base64 encoded float32 little endian binary data

func New

func New(url string) (*TTSHttpBackend, error)

func (*TTSHttpBackend) Synthesize

func (t *TTSHttpBackend) Synthesize(text string) (engine.AudioChunk, error)

Jump to

Keyboard shortcuts

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