Onex
Onex
Home
Products
Documentation
Changelog
Login with FiveM
  • 👋 Welcome
  • Claim Purchase
  • Translations
    • Weaponmeta
    • Voice Interaction
      Integrations
      Installation
      ⭐ Convars
      Llm-setup
      Tts-setup
      Configuration
      Features
      Api
Artifacts Tracker
  1. Onex Scripts
  2. Scripts_guides / Stt Setup
Ctrl K

STT SETUP#

STT (Speech-to-Text) converts what the player says into text for the voice matching system. The script ships with a built-in STT backend — no key is required to get started.

Adding a BYOK STT key unlocks:

  • Multi-language support — transcribe in any language, not just English
  • Language = "auto" — auto-detect the spoken language per player
  • Higher accuracy — provider-grade models instead of the built-in backend
  • Secondary fallback — a second provider if the primary fails

Providers#

Groq is the recommended STT provider. It has a generous free tier and is the only provider that enables Language = "auto" (automatic language detection).

Get a Groq API key#

Create a free account at console.groq.com and generate an API key.

Add to server.cfg#

set stt_api_key "your_groq_api_key_here" set stt_provider "groq" ensure [onex]

Secondary Fallback#

You can configure a second STT provider. If the primary provider fails, the system automatically falls back to the secondary. Both providers can be different (e.g. Groq primary, Azure secondary).

# Primary set stt_api_key "your_primary_key" set stt_provider "groq" # Secondary fallback set stt_api_key_2 "your_fallback_key" set stt_provider_2 "azure" set azure_stt_region_2 "westeurope" # only needed if secondary is Azure

stt_provider_2 is required when stt_api_key_2 is set. If omitted, the secondary slot is ignored.

Translation Convars#

These control how voice input is translated before command matching. Set in server.cfg — not in config.lua.

ConvarDefaultDescription
voice_translate"auto""auto" | "true" | "false" — enable/disable translation
voice_translate_target"en"Language your command phrases are written in
voice_dual_match"false"Match against both raw and translated text simultaneously
voice_dual_match_priority"highest_score""highest_score" | "raw_first" | "translated_first"
set voice_translate "auto" set voice_translate_target "en" set voice_dual_match "true" set voice_dual_match_priority "highest_score"

"auto" enables translation only when Config.Language differs from voice_translate_target. voice_dual_match is useful when players speak in a non-English language but your phrases are in English — it matches against both the raw transcript and the translated version and picks the best result.

Deprecation Notice#

groq_api_key is deprecated. It still works as a fallback (for both STT and LLM) but will be removed in a future version. Migrate to stt_api_key + stt_provider "groq".

# Old (still works, but deprecated) set groq_api_key "your_key" # New set stt_api_key "your_key" set stt_provider "groq"

Last updated 3 months ago

Quick Links

All DocumentationOur Products