voice

package
v0.0.0-...-dbd7530 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AquestalkList

func AquestalkList() map[string]string

func CreateAquestalkWav

func CreateAquestalkWav(speech Speech) (string, error)

func CreateVoiceVoxWav

func CreateVoiceVoxWav(speech Speech) (string, error)

func CreateVoiceroidWav

func CreateVoiceroidWav(speech Speech) (string, error)

func CreateWav

func CreateWav(speech Speech) (string, error)

func GenerateAudioQuery

func GenerateAudioQuery(speech Speech) (model.AudioQuery, error)

func IsAquesTalk

func IsAquesTalk(name string) bool

func IsVoiceRoid

func IsVoiceRoid(name string) bool

func IsVoiceVox

func IsVoiceVox(name string) bool

func LocalVoiceList

func LocalVoiceList() map[string]string

func VoiceList

func VoiceList() []string

func VoiceRoidList

func VoiceRoidList() map[string]string

func Voices

func Voices() map[string]string

func VoicevoxList

func VoicevoxList() map[string]string

Types

type Speech

type Speech struct {
	Text     string
	UserInfo model.UserInfo
	WavFile  string
}

type SpeechSignal

type SpeechSignal struct {
	Data Speech
	V    *VoiceInstance
}

type VoiceInstance

type VoiceInstance struct {
	sync.Mutex
	Voice      *discordgo.VoiceConnection
	Session    *discordgo.Session
	QueueMutex sync.Mutex
	VoiceMutex sync.Mutex
	NowTalking Speech
	Queue      []Speech
	Recv       []int16
	GuildID    string
	ChannelID  string
	Speaking   bool
	Stop       chan bool
}

func (*VoiceInstance) PlayQueue

func (v *VoiceInstance) PlayQueue(speech Speech)

func (*VoiceInstance) QueueAdd

func (v *VoiceInstance) QueueAdd(speech Speech)

QueueAdd

func (*VoiceInstance) QueueClean

func (v *VoiceInstance) QueueClean()

QueueClean

func (*VoiceInstance) QueueGetSpeech

func (v *VoiceInstance) QueueGetSpeech() (speech Speech)

QueueGetSong

func (*VoiceInstance) QueueRemoveFisrt

func (v *VoiceInstance) QueueRemoveFisrt()

QueueRemoveFirst

func (*VoiceInstance) StopTalking

func (v *VoiceInstance) StopTalking()

func (*VoiceInstance) Talk

func (v *VoiceInstance) Talk(speech Speech) error

Jump to

Keyboard shortcuts

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