Documentation
¶
Index ¶
- Variables
- func Play(sp core.AudioSpeaker, voice, text string) error
- func Start(sp core.AudioSpeaker, twitchUsername string)
- func Stop(twitchUsername string) error
- func SubOnlyGet(place int64) (bool, error)
- func SubOnlySet(place int64, state bool) error
- func TTS(voice, text string) ([]byte, error)
- func VoiceGet(person, place int64) (string, error)
- func VoiceSet(person, place int64, voice string) error
- type TTSResp
Constants ¶
This section is empty.
Variables ¶
var ( ErrHookNotFound = errors.New("Wasn't monitoring, what are you even trynna do??") ErrPersonNotFound = errors.New("Person's voice has not been set.") )
var Advanced = advanced{}
var AdvancedStart = advancedStart{}
var AdvancedStop = advancedStop{}
var AdvancedSubOnly = advancedSubOnly{}
var AdvancedSubOnlyOff = advancedSubOnlyOff{}
var AdvancedSubOnlyOn = advancedSubOnlyOn{}
var AdvancedSubOnlyShow = advancedSubOnlyShow{}
var AdvancedVoice = advancedVoice{}
var AdvancedVoiceSet = advancedVoiceSet{}
var AdvancedVoiceShow = advancedVoiceShow{}
var Hooks = gosafe.Map[string, int]{}
var NormalSubOnly = normalSubOnly{}
var NormalSubOnlyOff = normalSubOnlyOff{}
var NormalSubOnlyOn = normalSubOnlyOn{}
var NormalTTS = normalTTS{}
var NormalVoice = normalVoice{}
NormalVoice is not a sub-command
var Voices = []string{
"en_us_ghostface",
"en_us_chewbacca",
"en_us_c3po",
"en_us_stitch",
"en_us_stormtrooper",
"en_us_rocket",
"en_female_madam_leota",
"en_male_ghosthost",
"en_male_pirate",
"en_au_001",
"en_au_002",
"en_uk_001",
"en_uk_003",
"en_us_001",
"en_us_002",
"en_us_006",
"en_us_007",
"en_us_009",
"en_us_010",
"fr_001",
"fr_002",
"de_001",
"de_002",
"es_002",
"es_mx_002",
"br_001",
"br_003",
"br_004",
"br_005",
"id_001",
"jp_001",
"jp_003",
"jp_005",
"jp_006",
"kr_002",
"kr_003",
"kr_004",
"en_male_narration",
"en_male_funny",
"en_female_emotional",
"en_male_cody",
}
Functions ¶
func Play ¶
func Play(sp core.AudioSpeaker, voice, text string) error
Play will, if necessary join the appropriate voice channel, and start playing the TTS specified by text.
func Start ¶
func Start(sp core.AudioSpeaker, twitchUsername string)
Start will create a hook and will monitor all incoming messages, if they are from twitch and match the specified username then the the TTS audio will be sent to the specified speaker.
func Stop ¶
Stop will delete the hook created by Start. Returns ErrHookNotFound if the hook doesn't exist.
func SubOnlyGet ¶
SubOnlyGet returns the sub-only state for the specified place.
func SubOnlySet ¶
SubOnlySet sets the sub-only state for the specified place.
func TTS ¶
TTS will return a slice of bytes containing the audio generated by the TikTok TTS. You need to have the TikTokSessionID global set.
Types ¶
type TTSResp ¶
type TTSResp struct { Data struct { SKey string `json:"s_key"` VStr string `json:"v_str"` Duration string `json:"duration"` Speaker string `json:"speaker"` } `json:"data"` Extra struct { LogID string `json:"log_id"` } `json:"extra"` Message string `json:"message"` StatusCode int `json:"status_code"` StatusMsg string `json:"status_msg"` }