Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTranscriberAccent ¶ added in v0.2.387
func GetTranscriberAccent(w *ProcessedWord) int
GetTranscriberAccent return accent from ProcessedWord
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 Clitic ¶ added in v0.2.387
type Clitic struct { Type CliticAccentEnum Accent int }
Clitic structure
type CliticAccentEnum ¶ added in v0.2.387
type CliticAccentEnum int
CliticAccentEnum contains types of possible clitics
const ( //CliticsUnused - clitics does not apply for the word CliticsUnused CliticAccentEnum = iota //CliticsNone - not a clitic CliticsNone //CliticsCustom - custom clitic type CliticsCustom )
type MainWorker ¶
type MainWorker struct { AllowCustomCode bool // contains filtered or unexported fields }
MainWorker does synthesis work
func (*MainWorker) AddSSML ¶ added in v0.2.387
func (mw *MainWorker) AddSSML(pr Processor)
AddSSML adds a SSML processor to the end
func (*MainWorker) GetProcessorsInfo ¶ added in v0.2.407
func (mw *MainWorker) GetProcessorsInfo() string
GetProcessorsInfo return info about processors for testing
func (*MainWorker) GetSSMLProcessorsInfo ¶ added in v0.2.387
func (mw *MainWorker) GetSSMLProcessorsInfo() string
GetSSMLProcessorsInfo return info about processors for testing
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) 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 Clitic Clitic Transcription string Obscene bool TextPart *TTSTextPart }
ProcessedWord keeps one word info
type SSMLTypeEnum ¶ added in v0.2.387
type SSMLTypeEnum int
SSMLTypeEnum indicates part type: text, pause
const ( // SSMLNone - not ssml part SSMLNone SSMLTypeEnum = iota // SSMLMain - main part SSMLMain // SSMLText - text part for synthesis SSMLText // SSMLPause - <p>, <break> part for synthesis SSMLPause )
type TTSConfig ¶
type TTSConfig struct { JustAM bool Input *api.TTSRequestConfig Type SSMLTypeEnum Voice string Speed float32 PauseDuration time.Duration }
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 CleanedText []string // corresponds to OriginalTextParts NormalizedText []string // text after normalization, array corresponds to OriginalTextParts Text []string // text after cleaning and URL replacement TextWithNumbers []string AudioSuffix string // add audio suffix if var is set Words []*ProcessedWord Parts []*TTSDataPart Audio string AudioMP3 string AudioLenSeconds float64 OriginalTextParts []*TTSTextPart SSMLParts []*TTSData }
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 TTSTextPart ¶ added in v0.2.407
type TTSTextPart struct {
Accented, Text, Syllables, UserOEPal string
}
TTSTextPart part of the text