ESX • QBCore • Qbox compatible
Instant download
Updates included
Discord support
Secure checkout

Holographic & Audible Notifications

Resource folder: gs_ttswatch

View product

Installation Instructions for Holographic & Audible Notifications

Follow these steps to install and configure gs_ttswatch on your FiveM server.

  1. Download the Resource
    • Go to portal.cfx.re
    • Navigate to Assets > Granted Assets > gs_ttswatch
    • Download the resource
  2. Extract the Files
    • Open the downloaded .zip file
    • Inside, you'll find a folder named gs_ttswatch
    • Move the entire gs_ttswatch folder into your desired server resources folder (e.g., /resources/[scripts])
  3. Add to Server Configuration
    • Open your server.cfg
    • Add the following line:
      ensure gs_ttswatch
  4. Restart the Server
    • Restart your FiveM server (Important!)
  5. Configure the Script (Optional)
    • Navigate to gs_ttswatch/config.lua
    • Edit the configuration options to fit your server's needs

Additional documentation

Setting up ElevenLabs

  1. Create a free account on ElevenLabs here.
  2. After creating an account, click on Developers at the bottom left and navigate to the API Keys tab.
  3. Press + Create Key and make sure you set Text to Speech to Access.
  4. Copy the API key to gs_ttswatch/config.lua under Config.ElevenLabs.ApiKey.
  5. You can generate up to 20,000 characters for free each month. If you require more characters, you can upgrade to a paid monthly subscription on ElevenLabs.
  6. If you want to use all 20,000 characters, set ModelId = 'eleven_turbo_v2_5' in gs_ttswatch/config.lua.

Triggering audible notification from script

You can play a notification from a server-sided script through:

exports.gs_ttswatch:PlayAudioMessage(serverId, text, name, image, volume, voiceId)
exports.gs_ttswatch:IsAudioLoading(serverId) -- This export returns true while the audible notification is being generated.

or from a client-sided script through:

exports.gs_ttswatch:PlayAudioMessage(text, name, image, volume, voiceId)

If you want to save ElevenLabs credits, you can go to the Text to Speech option in your ElevenLabs account, generate the desired audio and go to History on the top right. Under this tab, you can hover over previously created audio files, and download these directly. Place the downloaded audio file in the gs_ttswatch/html/audio folder and play it directly using the export below.

You can play any pre-recorded audio file (if the file is added to gs_ttswatch/html/audio) from a server-sided script through:

exports.gs_ttswatch:PlaySavedAudioMessage(serverId, fileName, name, image, volume)

or from a client-sided script through:

exports.gs_ttswatch:PlaySavedAudioMessage(fileName, name, image, volume)

Input arguments:

  • serverId: The server-id of the player that should receive the notification (only for server-sided exports).
  • text: The text that will be transformed into a voice-over.
  • fileName: The name of the audio file that will play, i.e. "sample.mp3" (audio file needs to be located in gs_ttswatch/html/audio).
  • name: The name that will be displayed on the hologram.
  • image: The image that will be displayed on the hologram (you can add custom images to gs_ttswatch/html/images).
  • volume: The volume of the voice-over (value between 0-1).
  • voiceId: The voice-id that will be used as the voice.

What do I need to set this up?

You need a free ElevenLabs account and a Text-to-Speech API key (not another ElevenLabs product). Put the key in Config.ElevenLabs.ApiKey in config. Full setup steps are in the docs at gamzkystore.com/docs/gs_ttswatch.

Free tier gives roughly 10,000 to 20,000 characters per month depending on the model you choose.

The resource errors on start or /testwatch fails with an audio error

A common mistake is the wrong volume config key:

-- Wrong
Config.Audio.DefaultVolume = 0.5

-- Correct
Config.DefaultVolume = 0.5

This was fixed in an official update, but old configs copied from forums may still have the typo.

ElevenLabs returns status 404

Check these:

  1. The API key is for Text-to-Speech, not another ElevenLabs service.
  2. VoiceId is valid. Test with the default 2EiwWnXFnvU5JabPnv8n.
  3. Do not pass 'default' as a voice ID in exports. Use nil to fall back to config.

ElevenLabs returns status 402

Usually means monthly credits are used up, or you selected a premium voice that needs a paid subscription. Check your ElevenLabs subscription page. Workarounds: use default API voices, or play pre-recorded .mp3 files instead of live TTS.

TTS worked yesterday but not today

Check remaining ElevenLabs credits, confirm the API key still has Text-to-Speech permission, and run /text2speech with Config.Debug = true to test outside other scripts.

What languages are supported?

ElevenLabs multilingual models auto-detect language from the text you send. Dozens of languages are supported depending on the model. For less common languages, set both VoiceId and ModelId in config (for example eleven_flash_v2_5 for Hungarian) and test with /text2speech.

How do I trigger notifications from another script?

Client:

exports.gs_ttswatch:PlayAudioMessage(text)
exports.gs_ttswatch:PlayAudioMessage(text, name, image, volume, voiceId)

Server:

exports.gs_ttswatch:PlayAudioMessage(serverId, text)
exports.gs_ttswatch:PlayAudioMessage(serverId, text, name, image, volume, voiceId)

Only text is required. Other fields use config defaults when omitted.

Can I replace ESX or QB notifications with this?

Yes. Point your framework's notify function at exports.gs_ttswatch:PlayAudioMessage. Turn off the original script's built-in notify flag so players do not get double notifications. The same approach works for qb-notify wrappers server-wide.

How do I play saved audio without using API credits?

From v1.1 onward use PlaySavedAudioMessage. Put .mp3 files in gs_ttswatch/html/audio/ and pass the filename with extension (for example "tour1.mp3").

Client: exports.gs_ttswatch:PlaySavedAudioMessage(fileName, name, image, volume)

Server: exports.gs_ttswatch:PlaySavedAudioMessage(serverId, fileName, name, image, volume)

Does the script cache TTS to save credits?

Yes. Identical TTS requests are cached server-side until restart when caching is enabled in config. You can also generate audio once on the ElevenLabs website, download it, and play it as a saved file.

/text2speech does not work with my custom chat resource

Some chat resources break argument parsing (spaces get mangled). Skip command testing and call the export directly from your scripts instead.

Can I move the hologram to the other hand?

Position is configurable under Config.Hologram (bone, offset, rotation). Default uses the left hand because the bundled animation fits it. Right-hand placement may need a different animation.

How do I wait until audio finishes loading in server logic?

Use the server export IsAudioLoading after PlayAudioMessage and poll until it returns false before continuing timed events. This reports load state, not queue position. Multiple requests per player are queued automatically.

Custom framework bridge errors

If you use a non-standard framework, edit the bridge files to match your notify and player APIs. Open-source buyers can modify these directly.