G.A.SG.A.S Docs
G.A.S Docs / Other

RR-Speech — NPC Voice Line API

Give your NPCs a voice using GTA's own built-in lines — no audio files, no AI, no TTS. A tiny, dependency-free API that lets any of your scripts make peds talk, shout, or mutter ambient chatter on demand.

Version v1.0.0Framework FiveM / StandaloneUpdated June 2026 FREE Get it on the store →

Make any NPC talk with one line of code — using GTA V's built-in voice lines.

rr-speech is a tiny, standalone helper that lets any resource trigger the game's native ambient speech ("speeches") on a ped. No audio files, no TTS, no external services — it plays the voice lines that already ship with GTA V, using whatever voice the ped's model already has. Perfect for guards, gang members, hostages, dealers, cops, shopkeepers, or any ambient NPC that should react out loud.

  • Zero dependencies — pure native, no ox_lib / framework required.
  • Framework-agnostic — works on any FiveM server (qb, qbx, ESX, standalone).
  • Server-friendly — 100% client-side, no networking, no server load.
  • Drop-in — three simple exports, ready in seconds.
  • No streamed assets — nothing to download in-game.

Installation

  1. Drop the rr-speech folder into your resources directory.
  2. Add ensure rr-speech to your server.cfg.
  3. Start (or restart) your server. That's it.

There is nothing to configure to get started, and no database.


Usage

Call the exports from any other resource (client-side):

-- Say one line right now
exports['rr-speech']:Say(ped, 'threaten')

-- Say a line with options
exports['rr-speech']:Say(ped, 'scared_shout', { param = 'SPEECH_PARAMS_FORCE_SHOUTED', chance = 80 })

-- Register a ped for periodic idle chatter
exports['rr-speech']:Ambient(ped, 'idle')

-- Stop a ped's ambient chatter
exports['rr-speech']:StopAmbient(ped)

Exports

ExportSignatureReturns
SaySay(ped, category, opts?)the speech name played, or nil if skipped
AmbientAmbient(ped, category, opts?)— (idempotent; call again to update settings)
StopAmbientStopAmbient(ped)

opts table (all optional)

FieldApplies toDescription
paramSay / AmbientSpeech param string (else the category default)
voiceSay / AmbientForce a specific voice name
cooldownSayPer-ped anti-spam gap in ms (default Config.SayCooldown)
forceSayIgnore the cooldown
chanceSay / Ambient0–100 % chance to actually speak
minGap / maxGapAmbientMin/max ms between a ped's ambient lines

Tip: category can also be a raw speech name straight from the FiveM speeches catalog — if it isn't a known category it's played as a literal line.


Categories

Categories are defined in config.lua. Each is a list of speech names; one is picked at random per call. Out of the box:

CategoryMoodCategoryMood
greetsays hiwar_crybattle scream
thanksthanks youscarednervous
byesays goodbyescared_shoutpanicked
idlerandom mutteringbegbegging
insultcurses at youdrug_deallow-key dealer talk
threatenthreatens youcop_order"you're under arrest"
cop_pursuitchase shouts

Adding your own lines — just append speech names to any list in Config.Lines, or add a new category. No code changes needed.

A speech only plays if the ped's voice model supports it (e.g. cop_order needs a cop-voiced ped). Each list is anchored with generic lines that work on almost any ped, so you'll always hear something.


Configuration (config.lua)

SettingPurpose
Config.DebugWhen true, prints a load banner and registers the /speechtest command. Ship with this false.
Config.SayCooldownDefault ms between Say calls for the same ped
Config.Ambient.*Tick rate, min/max gap, hearing distance, and % chance for ambient chatter
Config.LinesThe voice-line categories
Config.ParamsDefault speech param per category (normal vs. shouted)

Debug / testing

Set Config.Debug = true to enable the /speechtest <category> command, which makes the nearest ped talk and reports which line fired. Leave it false on a live server so the command is never exposed to players.


Compatibility

  • FiveM (any build). Client-side only.
  • No framework, no ox_lib, no database, no dependencies.

Credits

© Gas Team Developers. All rights reserved.

Last updated August 10, 2026