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 off
  • talk: held while speaking, only works when voice mode is on
  • wakeWord: 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 length
  • silenceMsToStop: how much silence to wait for before treating speech as complete
  • energyThresholdMul: VAD strictness. Higher means louder speech required
  • model: leave on whisper-large-v3-turbo for fast or change to whisper-large-v3 for slightly better accuracy at higher cost
  • language: ISO 639-1 code or nil for auto-detect
  • prompt: 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 GroqDailyTotal at or below this to stay free

Approval mode

Config.ApprovalRequestMode = 'auto'

Modes:

  • auto: skip the in-game popup, browser handles permission
  • onFirstJoin: popup on first server join
  • onFirstTalk: popup the first time the player tries to talk
  • onEvent: 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 switch
  • action: 'drop' kicks the player, 'event' fires Config.BlacklistPolicy.eventName for custom handling
  • High confidence threshold prevents false positives from misheard audio

View Rivo Voice