voicefx

package
v0.0.0-...-6b7fec4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(fx.Provide(New))

Functions

This section is empty.

Types

type Params

type Params struct {
	fx.In
	Session *discordgo.Session
	Log     *zap.Logger
}

type Result

type Result struct {
	fx.Out

	Commands []*discordfx.ApplicationCommandWithHandler `group:"command,flatten"`
}

func New

func New(p Params) Result

type Speaker

type Speaker struct {
	GuildID       string
	ChannelID     string
	SSRC          string
	Username      string
	Discriminator string
}

type VoiceHelper

type VoiceHelper interface {
	GetSpeakers()
	GetGuildID() string
}

VoiceHelper manages the state for a guild. VoiceHelper is responsible for decoding opus audio and splitting it into PCM sample data on a separate channel per speaker.

type VoiceHelperProvider

type VoiceHelperProvider interface {
	GetVoiceHelper(gid string) VoiceHelper
}

VoiceHelperProvider creates singleton VoiceHelper for each guild if it does not already exist.

Jump to

Keyboard shortcuts

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