Configuration
Configuration
All player-facing config lives in shared/config.lua. All server-only config (your API token, daily caps) lives in server/config.lua.
Keybinds
Config.Keybind = {
toggle = {
command = 'stratis_voice_toggle',
defaultKey = 'F7',
defaultMapper = 'keyboard',
description = 'Stratis Voice: enable/disable'
},
talk = {
command = '+stratis_voice_talk',
releaseCommand = '-stratis_voice_talk',
defaultKey = 'N',
defaultMapper = 'keyboard',
description = 'Stratis Voice: hold to talk'
},
wakeWord = nil
}
toggle: pressed once to turn voice mode on, again to turn it offtalk: held while speaking, only works when voice mode is onwakeWord: optional. Set to a string like'stratis'and players must say "stratis hands up" instead of just "hands up"
Players can rebind both keys in the FiveM keybinds menu.
Speech to text
Config.STT = {
maxUtteranceMs = 12000,
silenceMsToStop = 700,
energyThresholdMul = 3.5,
model = 'whisper-large-v3-turbo',
language = 'en',
prompt = nil
}
maxUtteranceMs: hard cap on a single utterance lengthsilenceMsToStop: how much silence to wait for before treating speech as completeenergyThresholdMul: VAD strictness. Higher means louder speech requiredmodel: leave onwhisper-large-v3-turbofor fast or change towhisper-large-v3for slightly better accuracy at higher costlanguage: ISO 639-1 code ornilfor auto-detectprompt: optional vocabulary biasing. See Prompt biasing
Rate limits
Config.RateLimit = {
transcribeWindowMs = 60000,
transcribeMax = 12,
transcribeMinIntervalMs = 750,
dedupWindowMs = 60000
}
- Each player can submit at most 12 transcriptions per minute
- Minimum 750ms between consecutive uploads from the same player
- Same audio re-sent within 60s by the same player is rejected as duplicate
Daily caps
In server/config.lua:
ServerConfig.GroqDailyPerPlayer = 50
ServerConfig.GroqDailyTotal = 2000
- Per-player cap stops one bad actor from burning your quota
- Server-wide cap is your absolute ceiling. Free tier maxes at 2000/day, set
GroqDailyTotalat or below this to stay free
Approval mode
Config.ApprovalRequestMode = 'auto'
Modes:
auto: skip the in-game popup, browser handles permissiononFirstJoin: popup on first server joinonFirstTalk: popup the first time the player tries to talkonEvent: popup only when a server event triggers it
Blacklist policy
Config.BlacklistedWords = { 'slur1', 'slur2' }
Config.BlacklistPolicy = {
enabled = true,
action = 'drop',
dropReason = 'Speech policy violation.',
cooldownMs = 10000
}
Config.MinimumConfidenceForBlacklistedWords = 0.80
enabled: master switchaction:'drop'kicks the player,'event'firesConfig.BlacklistPolicy.eventNamefor custom handling- High confidence threshold prevents false positives from misheard audio