voices

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Skipped         error
	SourceDisabled  error
	NoSuchSource    error
	VoiceConnClosed error
)
View Source
var (
	AquestalkProxy *aquestalkProxy
)
View Source
var (
	Azure azure
)
View Source
var (
	Coeiroink coeiroink
)
View Source
var (
	Gcp gcp
)
View Source
var Gtts *gtts
View Source
var (
	VoiceText voiceText
)
View Source
var (
	Voicevox voicevox
)
View Source
var (
	Watson *watson
)

Functions

func CleanVoice

func CleanVoice()

func Encode

func Encode(orgData []byte, voiceInfo VoiceInfo) ([]byte, error)

func GetVoice

func GetVoice(content string, voice *config.Voice) ([]byte, error)

func ReadVoice

func ReadVoice(session *discordgo.Session, orgMsg *discordgo.MessageCreate, encoded []byte) error

func SplitToFrame

func SplitToFrame(data []byte) ([][]byte, error)

func VerifyVoice

func VerifyVoice(source string, voice string) error

Types

type AquestalkProxyRequest

type AquestalkProxyRequest struct {
	VoiceType string `json:"type"`
	Speed     int    `json:"speed"`
	Koe       string `json:"koe"`
}

type Speaker

type Speaker struct {
	Name        string
	SpeakerUUID string
	Styles      []Style
}

type Speakers

type Speakers struct {
	Speakers []Speaker
}

type Style

type Style struct {
	Id   int
	Name string
}

type VoiceInfo

type VoiceInfo struct {
	Type             string
	Format           string
	Container        string
	ReEncodeRequired bool
	Enabled          bool
}

type VoiceSource

type VoiceSource interface {
	Verify(voice string) error
	Synth(content string, voice string) ([]byte, error)
	GetInfo() VoiceInfo
}

func SourceSwitcher

func SourceSwitcher(source string) (VoiceSource, error)

Jump to

Keyboard shortcuts

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