RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Rally Audio ManagerRally Camera Path PlayerRally ClientRally Cut CaptureRally EnumsRally Extension HelperRally GeometryRally ManagerRecce ManagerRecce AppRecce SettingsRally Settings ManagerSnap-to-RoadTraffic Exclusion ZonesRally UtilityRally Vehicle CaptureRally Vehicle Tracker

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsgameplayrally

Rally Client

HTTP client for communicating with a local rally companion server. Sends recording cut commands and retrieves transcription results via REST API on `localhost:27872`.

HTTP client for communicating with a local rally companion server. Sends recording cut commands and retrieves transcription results via REST API on localhost:27872.


Public API

FunctionSignatureReturnsDescription
M.transcribe_recording_cut(requestBody)tablePOSTs a recording cut request to the server
M.transcribe_transcripts_get(count)tableGETs the specified number of transcription results

Internals

NameTypeDescription
base_urlstringhttp://localhost:27872 - local companion server
httpClient.TIMEOUTnumber0.5 seconds HTTP timeout

Response Format

All API calls return a table with:

  • ok - true on success, false on error
  • error - error code/message string on failure
  • client_msg - user-facing error message

Internal Helpers

FunctionDescription
jsonRequestGet(uri)Performs GET, decodes JSON response
jsonRequestPost(uri, data)Performs POST with JSON body, decodes response

How It Works

  1. Uses socket.http module with a 0.5s timeout for non-blocking behavior
  2. transcribe_recording_cut() POSTs to /recordings/actions/cut - tells the companion to cut and transcribe a recording segment
  3. transcribe_transcripts_get(count) GETs from /transcripts/<count> - retrieves recent transcription results
  4. Non-200 responses return {ok = false, error = <code>} with client_msg set

Usage Examples

local client = require('/lua/ge/extensions/gameplay/rally/client')

-- Cut the current recording
local resp = client.transcribe_recording_cut({ position = {x=100, y=200, z=50} })
if resp.ok then
  -- cut successful
end

-- Get latest transcriptions
local transcripts = client.transcribe_transcripts_get(5)

Notes

  • The companion server is an external process (Python-based) that handles audio recording and speech-to-text
  • Several endpoints are defined but commented out: recording_start, recording_stop, remote_audio_play_file, remote_audio_reset, remote_audio_queue_size
  • Uses ltn12.sink.table and ltn12.source.string for HTTP body handling
  • Short timeout prevents blocking the game loop if the server is unavailable

See Also

  • Rally Audio Manager - Related reference
  • Rally Camera Path Player - Related reference
  • Rally Cut Capture - Related reference
  • Gameplay Systems Guide - Guide

Rally Camera Path Player

Plays a cinematic camera path along a snaproad for rally stage preview. Generates a Catmull-Rom camera path from driveline points with configurable height offset, FOV, and playback speed.

Rally Cut Capture

Captures vehicle position/rotation snapshots ("cuts") during recce recording sessions. Each cut is written as a JSON line to a file for later processing by the transcription pipeline.

On this page

Public APIInternalsResponse FormatInternal HelpersHow It WorksUsage ExamplesNotesSee Also