api

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpeechMarkTypeWord = "word"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormatEnum

type AudioFormatEnum int

AudioFormatEnum represent possible audio outputs

const (
	//AudioNone value
	AudioNone AudioFormatEnum = iota
	//AudioDefault value
	AudioDefault
	//AudioMP3 value
	AudioMP3
	//AudioM4A value`
	AudioM4A
)

func (AudioFormatEnum) String

func (e AudioFormatEnum) String() string

type InfoResult added in v0.2.387

type InfoResult struct {
	Count int64 `json:"count"`
}

InfoResult is a response for /synthesizeInfo request

type Input

type Input struct {
	Text string `json:"text,omitempty"`
	//TextType may have values: text, ssml
	TextType string `json:"textType,omitempty"`
	//Possible values are m4a, mp3
	OutputFormat     string  `json:"outputFormat,omitempty"`
	OutputTextFormat string  `json:"outputTextFormat,omitempty"`
	AllowCollectData *bool   `json:"saveRequest,omitempty"`
	Speed            float32 `json:"speed,omitempty"`
	Voice            string  `json:"voice,omitempty"`
	Priority         int     `json:"priority,omitempty"`
	//Possible values are: word
	SpeechMarkTypes      []string `json:"speechMarkTypes,omitempty"`
	MaxEdgeSilenceMillis *int64   `json:"maxEdgeSilenceMillis,omitempty"`
}

Input is sythesis input data

type Result

type Result struct {
	AudioAsString string        `json:"audioAsString,omitempty"`
	Error         string        `json:"error,omitempty"`
	Text          string        `json:"text,omitempty"`
	RequestID     string        `json:"requestID,omitempty"`
	SpeechMarks   []*SpeechMark `json:"speechMarks,omitempty"`
}

Result is synthesis result

type SpeechMark added in v0.7.0

type SpeechMark struct {
	//In Millis from the start of the audio
	TimeInMillis int64 `json:"timeMillis"`
	//In Millis
	Duration int64 `json:"durationMillis,omitempty"`
	//Possible values are: word
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

SpeechMark

type TTSRequestConfig

type TTSRequestConfig struct {
	Text                 string
	RequestID            string
	OutputFormat         AudioFormatEnum
	OutputTextFormat     TextFormatEnum
	OutputMetadata       []string
	AllowCollectData     bool
	SaveTags             []string
	Speed                float32
	Voice                string
	Priority             int
	AllowedMaxLen        int
	SSMLParts            []ssml.Part
	AudioSuffix          string
	SpeechMarkTypes      map[string]bool
	MaxEdgeSilenceMillis int64
}

TTSRequestConfig config for request

type TextFormatEnum

type TextFormatEnum int

TextFormatEnum represent possible output text types

const (
	//TextNone do not output text
	TextNone TextFormatEnum = iota
	//TextNormalized output normalized text
	TextNormalized
	//TextAccented output normalized accented text
	TextAccented
	//TextTranscribed output data that was sent to AM
	TextTranscribed
)

func (TextFormatEnum) String

func (e TextFormatEnum) String() string

Jump to

Keyboard shortcuts

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