synthesizer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccentVariant

type AccentVariant struct {
	Accent   int     `json:"accent"`
	Accented string  `json:"accented"`
	Ml       string  `json:"ml"`
	Syll     string  `json:"syll"`
	Usage    float64 `json:"usage"`
}

AccentVariant - accenters's result

type MainWorker

type MainWorker struct {
	AllowCustomCode bool
	// contains filtered or unexported fields
}

MainWorker does synthesis work

func (*MainWorker) Add

func (mw *MainWorker) Add(pr Processor)

Add adds a processor to the end

func (*MainWorker) Work

func (mw *MainWorker) Work(input *api.TTSRequestConfig) (*api.Result, error)

Work is main method

type PartProcessor

type PartProcessor interface {
	Process(*TTSDataPart) error
}

PartProcessor interface

type PartRunner

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

PartRunner runs parts of the job

func NewPartRunner

func NewPartRunner(parallelWorker int) *PartRunner

NewPartRunner creates parallel runner

func (*PartRunner) Add

func (p *PartRunner) Add(pr PartProcessor)

Add adds a processor to the end

func (*PartRunner) Process

func (p *PartRunner) Process(data *TTSData) error

Process is main method

type ProcessedWord

type ProcessedWord struct {
	Tagged            TaggedWord
	UserTranscription string
	UserSyllables     string
	TranscriptionWord string
	AccentVariant     *AccentVariant
	UserAccent        int
	Transcription     string
}

ProcessedWord keeps one word info

type Processor

type Processor interface {
	Process(*TTSData) error
}

Processor interface

type TTSConfig

type TTSConfig struct {
	JustAM bool
	Input  *api.TTSRequestConfig
}

TTSConfig some TTS configuration

type TTSData

type TTSData struct {
	Input              *api.TTSRequestConfig
	RequestID          string
	Cfg                TTSConfig
	OriginalText       string
	PreviousText       string // text of previous request loaded by requestID
	Text               string
	TextWithNumbers    string
	ValidationFailures []api.ValidateFailure

	Words []*ProcessedWord
	Parts []*TTSDataPart

	Audio    string
	AudioMP3 string
}

TTSData working data for one request

type TTSDataPart

type TTSDataPart struct {
	Text       string
	Cfg        *TTSConfig
	First      bool
	Words      []*ProcessedWord
	Spectogram string
	Audio      string
}

TTSDataPart partial tts data

type TaggedWord

type TaggedWord struct {
	Separator   string
	SentenceEnd bool
	Space       bool
	Word        string
	Mi          string
	Lemma       string
}

TaggedWord - tagger's result

func (TaggedWord) IsWord

func (tw TaggedWord) IsWord() bool

IsWord returns true if object indicates word

Jump to

Keyboard shortcuts

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