ssml

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPause

func IsPause(p Part) bool

IsPause checks if part is a Pause

Types

type ErrParse

type ErrParse struct {
	Pos int64
	Msg string
}

ErrParse indicates an SSML parse error

func (*ErrParse) Error

func (e *ErrParse) Error() string

type Part

type Part interface{}

Part is an abstracted part of SSML input

func Parse

func Parse(r io.Reader, def *Text, voiceFunc func(string) (string, error)) ([]Part, error)

Parse parses xml into synthesis structure

type Pause

type Pause struct {
	IsBreak  bool
	Duration time.Duration
}

Pause represents Pause directive

type Text

type Text struct {
	Speed float32
	Voice string
	Texts []TextPart
}

Text represents Text directive

type TextPart added in v0.2.407

type TextPart struct {
	Text      string
	Accented  string
	Syllables string
	UserOEPal string // long/short OE and palatalization model
}

TextPart represents some part of text

Jump to

Keyboard shortcuts

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