Browse docs
Station Announcements and TTS
Station announcements play audio around a configured station from the Dispatch center. You can prepare an MP3 once and reuse it, or connect a service that generates speech for changing text. Jobs Base provides the playback integration; a TTS service and its hosting are separate.
Choose your workflow
| What you want | What you need | Jobs Base input |
|---|---|---|
| Repeat a fixed announcement | An MP3 on your webspace | Approved audio URL |
| Generate an announcement with Google Cloud, ElevenLabs or VoiceRSS, then reuse it | Follow one provider guide below and upload its MP3 | Approved audio URL |
| Read changing text entered in the Dispatch center | A compatible TTS endpoint that returns playable audio, plus any required backend integration | Announcement text and a configured TTS URL Template |
For a first setup, start with one hosted MP3. This checks the station, permissions and audio playback before adding automatic speech generation.
1. Prepare Jobs Base
- Set up the Dispatch center, including its covered jobs and dispatcher access.
- Install xSound and start its resource before Jobs Base.
The supplied adapter name is
xsound. - Open /jobconfig → Jobs Base Configurator → Dispatch & Tracking → Dispatch and find
Announcement. Set Enabled to
true, Resource toxsound, and choose a radius. The default radius is 65 metres. - Under the same Dispatch settings, edit your Center → Stations and add a target station. Give it a unique ID, its department's exact job name, and either its coordinates or a station POI. The department must be one of that center's Covered jobs.
- If using a POI, select one from that job's Dispatch → POIs and use its exact name in
the station's
poifield. A matching POI's radius overrides the default announcement radius. - Grant the employee Dispatch center permission (
21). With the supplied permission settings, announcements also need Dispatch warnings (23). Start a dispatcher shift with Situation control selected; that role includessend_announcementsby default. - Save your settings. The supplied centers start with empty station lists, so adding an audio URL alone does not create a target station.
When Config.UseIngameConfigurator is enabled, saved settings take precedence over
sky_jobs_base/config/config.lua. Change the effective settings in /jobconfig. If you use
file configuration instead, edit the existing Config.Dispatch settings and restart Jobs Base.
Preserve the rest of your center and Dispatch configuration.
Playback is positional: nearby players in the same routing bucket can hear it, including players outside the department. A dispatcher working away from the station may not hear the announcement.
2. Create your announcement
Choose one provider. You do not need accounts with all three. Check the provider's current pricing and usage limits before generating speech; Jobs Base does not include provider credits.
Google Cloud Text-to-Speech
Google Cloud can create your announcement as an MP3. Its API is not a direct playback URL:
it accepts a POST request and its REST response contains Base64-encoded audio in JSON.
See Google's synthesis API.
- Open the Google Cloud setup guide. Choose a project, enable billing, and enable the Cloud Text-to-Speech API.
- Install the Google Cloud CLI. Run
gcloud initand sign in with an account allowed to use that project. - Open PowerShell in the folder where you want to save the MP3. In the example below, replace
YOUR_PROJECT_IDand the announcement text. The sample requests German speech (de-DE). - Run the example. It requests MP3 audio and saves the decoded response as
station-announcement.mp3in the current folder. It does not print your access token.
$ttsProject = "YOUR_PROJECT_ID"
$ttsToken = (gcloud auth print-access-token).Trim()
$ttsRequest = @{
input = @{ text = "Achtung, Einsatz fuer die Feuerwehr. Bitte zur Fahrzeughalle." }
voice = @{ languageCode = "de-DE" }
audioConfig = @{ audioEncoding = "MP3" }
} | ConvertTo-Json -Depth 4
$ttsResponse = Invoke-RestMethod `
-Method Post `
-Uri "https://texttospeech.googleapis.com/v1/text:synthesize" `
-Headers @{ Authorization = "Bearer $ttsToken"; "x-goog-user-project" = $ttsProject } `
-ContentType "application/json; charset=utf-8" `
-Body ([System.Text.Encoding]::UTF8.GetBytes($ttsRequest))
[System.IO.File]::WriteAllBytes(
(Join-Path (Get-Location).Path "station-announcement.mp3"),
[System.Convert]::FromBase64String($ttsResponse.audioContent)
)
- Play the saved file locally. For a specific voice, use Google's current
voice catalog
and add its exact name to the request's
voiceobject. - Continue with Upload and play the MP3.
This is a one-time audio export. For changing text entered in-game, follow Automatic TTS. Keep Google authentication on the backend, following its authentication guide.
ElevenLabs
For fixed announcements, ElevenLabs offers a browser workflow without writing an API integration.
- Sign in to ElevenLabs and open Text to Speech.
- Choose a voice suited to your language. For German voices, use the language filter in the Voice Library. The speech language follows your text; a separate language selector is not required for this workflow.
- Enter the complete announcement and choose Generate speech.
- Listen to the result. Adjust the wording or voice and generate it again if needed.
- Use the download button for the generated result, or open it in History, and download MP3 (128 kbps). See ElevenLabs' download instructions.
- Continue with Upload and play the MP3.
For automated generation, the ElevenLabs API
uses a POST request with a voice ID and an xi-api-key header. This needs a backend integration;
the API address cannot be pasted into TTS URL Template as a ready playback link.
VoiceRSS
VoiceRSS can return MP3 audio from an API request. Its API key must stay out of player-visible URLs and Jobs Base configuration.
- Create a VoiceRSS account and obtain your API key.
- Open PowerShell 7 in the folder where you want to save the MP3. The example uses
Read-Host -MaskInput, which hides the key while you enter it. - Run the example below and enter your key at the prompt. Change
srcto your announcement.hl = "de-de"selects German andc = "MP3"selects MP3 output.
$ttsKey = Read-Host "VoiceRSS API key" -MaskInput
$ttsRequest = @{
key = $ttsKey
hl = "de-de"
src = "Achtung, Einsatz fuer die Feuerwehr. Bitte zur Fahrzeughalle."
c = "MP3"
f = "44khz_16bit_mono"
b64 = "false"
}
Invoke-WebRequest `
-Method Post `
-Uri "https://api.voicerss.org/" `
-Body $ttsRequest `
-OutFile "station-announcement.mp3"
- Play
station-announcement.mp3. If VoiceRSS returned an error message instead of audio, correct the key, quota or request settings before uploading it. See the VoiceRSS API reference. - Continue with Upload and play the MP3.
VoiceRSS also accepts GET, but putting its API URL with your private key into TTS URL Template
would expose that key to players. For automatic speech, use a backend as described below.
3. Upload and play the MP3
- Upload the finished MP3 to a web server that your players can reach. For example,
https://audio.example.org/announcements/station-announcement.mp3. Replace the example domain with your real host. - Open the direct link in a browser and confirm that the MP3 plays without a login or a file-sharing preview page. Keep the link stable and use HTTPS.
- In Jobs Base's Announcement settings, leave TTS URL Template empty. Add the exact
hostname to Allowed Audio Hosts. For the example, enter only
audio.example.org. - Do not include
https://, a port, a path or a wildcard in the host entry. Subdomains need their own entries: allowingexample.orgdoes not also allowaudio.example.org. - Save. Open Tablet → Dispatch → Open Dispatcher, start your permitted shift, and go to Communication → Station announcement.
- Select the station, leave Announcement text empty, paste the full link into Approved audio URL, and select Send announcement.
- Have a player stand near that station to hear the result. Wait at least 10 seconds before sending another announcement with the default cooldown.
For file configuration, the equivalent section is shown below. Update only the existing
announcement section inside Config.Dispatch; keep the other Dispatch settings.
announcement = {
enabled = true,
resource = "xsound",
defaultRadius = 65.0,
ttsUrlTemplate = "",
allowedAudioHosts = { "audio.example.org" }
},
4. Automatic TTS: optional developer integration
Use this workflow when dispatchers should type new text in-game and have it spoken automatically. Jobs Base does not include a Google Cloud, ElevenLabs or VoiceRSS synthesis backend. Setting up a provider account alone does not create a compatible TTS URL.
What the URL must do
- Provide a player-accessible
GETendpoint that returns playable audio directly, such as raw MP3 withContent-Type: audio/mpeg. A JSON response, normal website or login page is not audio. - Place
{text}in that endpoint's URL where it expects the announcement text. Jobs Base URL-encodes the text before inserting it; keep the placeholder exactly as shown. - Store any provider credentials exclusively on your backend. Google REST needs its response's
audioContentdecoded; ElevenLabs can return MP3 bytes; VoiceRSS should requestc=MP3. - Cache by text, voice and audio settings, and reuse the same result for concurrent requests. Multiple players can load one announcement URL, so one listener must not cause a new paid synthesis of the same announcement.
- Protect the operation that creates new provider audio. Hiding a provider key behind a publicly accessible, unrestricted synthesis endpoint is not sufficient. A fixed token in the playback URL is visible to players too. Your developer may need an authenticated server-side synthesis step and a separate playback endpoint for already approved audio; that step is additional integration work beyond the existing URL-template setting.
The backend's language and deployment depend on your hosting, for example PHP webspace or a Node.js service on your own server. Follow the provider's authentication and API documentation. The requirements above describe the integration contract, not a bundled proxy or a provider URL that is ready to paste.
Connect an existing compatible endpoint
- First confirm that your endpoint produces audio for a short test sentence when opened in a browser, without requiring player logins or private request headers.
- Set TTS URL Template to its address, for example
https://tts.example.org/speech.mp3?text={text}. This is an illustrative address; replace it with the endpoint you have actually deployed. - Allowed Audio Hosts can stay empty when you use only the configured TTS template. This list controls manually entered audio URLs, not the configured template.
- Save. In Station announcement, select the station and enter a short Announcement text. Leave Approved audio URL empty and send the announcement.
- Check playback near the station. With both a TTS template and text present, the generated TTS URL takes precedence over a manually entered audio URL.
Troubleshooting
| What you see | What to check |
|---|---|
| No station-announcement panel | Enable announcements, start the configured xSound resource, and configure a TTS template or at least one allowed audio host. Check the shift's announcement capability. |
| The station selector is empty | Add a center station for a covered job. Supply coordinates or the exact name of an existing POI for that job. |
| Permission denied or disabled controls | Check duty, center access, selected shift roles and effective permission grants. The default announcement role is Situation control; default permission IDs are 21 and 23. |
| Audio URL rejected | Enter the full direct URL in the announcement form, and only its exact hostname in Allowed Audio Hosts. |
| Google/ElevenLabs API URL does not play | These APIs need requests that the playback template does not make. Export and host an MP3, or implement the backend described above. |
| Accepted, but no sound | Test the direct audio URL, xSound, the listener's sound settings, distance to the configured station and routing bucket. An accepted send does not confirm media playback on every client. |
| The MP3 contains an error message | Fix the provider authentication, quota or input error, then generate a real audio file again. Renaming an error response to .mp3 does not convert it. |
| Editing config.lua changes nothing | Saved /jobconfig settings take precedence while the ingame configurator is enabled. Edit the effective saved settings. |
For department-wide written notices, see Business and Announcements.