Free Intensive Nov 21–22Free 2-day hands-on Vibecoding Intensive on Nov 21–22 at 16:00 MSK (Sat–Sun) · Live Cohort 3 starts Nov 23Join Free →Cohort 3 (Nov 23)
ReleaseAPI / Product · ActionableHabr AI→ original

Euro Truck Simulator 2 Radio Companion Learns to Read the News and Thank Donors, for $1

The author of a companion radio app for Euro Truck Simulator 2 added news, greetings for a streamer's viewers and voiced thanks for donations to the broadcast in one working day. All 23 lines are voiced in advance and go on air only after a human has listened to them. The whole pool cost about $1, so rewriting and re-voicing a line is no big loss. For your own voice feature, use the same chain: draft, human, synthesis, check, flag.

AI-processed from Habr AI; edited by Hamidun News
Euro Truck Simulator 2 Radio Companion Learns to Read the News and Thank Donors, for $1
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Stress marksa dictionary of 101 words; "гудни" goes to synthesis as "гуднии"
GigaAM v3 checkthe match threshold against the source text is 80%
YouTube API polling~330 quota units per hour out of 10,000 per day

A voiced AI character usually breaks not on speech synthesis but on small details: the synthesizer puts the stress on the wrong syllable, and an unchecked line goes on air. The author of "Канал 15" (Channel 15), a companion app for Euro Truck Simulator 2 in which eighteen fictional truckers run a radio broadcast, described how he added three mechanics in a single working day: daily game news, greetings for a streamer's viewers, and voiced thanks for donations. Take the trucker slang "гудни" (from "goodnight," a wish for a good night's rest).

The synthesizer stubbornly reads it as "гУдни," and that kind of error has to be caught before air. In total, 23 lines went through the pipeline, and the whole pool cost about $1. If you build voiced characters, stream bots or any voice features with pre-recorded lines, you can take this approach as a ready-made checklist.

What was added and which rules were set

The radio reads game telemetry from shared memory and does not touch the game's own files. The news is read by the accounting character, who already sends the player voice messages for every "fine," so the voice fits the role. The drivers themselves deliver the commentary on the news. A separate detector handles donations: a script polls DonationAlerts or a similar service, and a donation event triggers a pre-approved, pre-voiced thank-you.

There are three constraints. First, voices are synthesized in advance, with no on-the-fly synthesis. The broadcast has to work offline, and the next line is drawn from a "deck." The author himself doubts how necessary this constraint is, but admits it adds some charm. Second, every text passes a human ear. AI assistants write drafts from a brief, but only approved and listened-to lines make it on air. Third, new features must not break the stable build, so everything ships behind flags.

The chain for a single line: a draft from an AI assistant, human approval, synthesis in ElevenLabs, a speech-recognition check, an entry in the deck, a pilot flag, then air. The donation detector knows nothing about the broadcast: it receives an event and queues a ready-made line. Thank-yous are not generated on the fly; a donation only picks a phrase from the prepared pool.

Flags instead of branches, and two voice-checking loops

Three config flags (stream_news_pilot, stream_greet_pilot and donation_pilot) are off by default and are enabled separately for each stream. The upsides: there are no forks, the test stand runs the same code, and a rollback is a config change rather than a commit revert. The author turned the downside into a rule: every pilot flag must pass the stand in its enabled state, otherwise you end up with an unnoticed dead branch of code. The stand is a trip simulation with fixed seeds, and the pilot's acceptance criterion is 20 green runs out of 20 with no new linter warnings.

The first loop runs before synthesis and deals with stress marks. The project has a dictionary of 101 words, which grows with each incident. A script runs the line through ruaccent and compares the result with the dictionary; if they differ, the line goes back for editing. The text reaches synthesis with a crude but reliable substitution: the stressed vowel is doubled ("гуднии"). GigaChat (Sber's free packages) suggests candidates for the dictionary, but the dictionary is the source of truth, and a human confirms the model's markup.

The second loop runs after synthesis. The finished track is checked by GigaAM v3, an open speech-recognition model from Sber that runs locally, for free and without a network connection. The recognized text is compared with the reference, with a match threshold of 80%. A dropped word or a wrong stress surfaces immediately, and suspicious lines go to manual listening. Listening to every phrase yourself costs more, while the automated check catches the same typical defects.

The YouTube loop, quotas and cost

The radio pulls stream metrics (viewers, chat messages, subscribers, Super Chat) through the official YouTube Data API v3, without scraping. The liveBroadcasts.list method finds the active broadcast and returns liveChatId, which is cached for the session. After that, the app polls liveChatMessages.list, which returns up to 200 messages per call. Polling uses about 330 quota units per hour against a daily limit of 10,000, so even a three-hour stream spends roughly a tenth of the daily budget.

The dependency is hard: it requires an OAuth token from the channel owner with read-only access, so this loop is tied to a specific channel and the streamer's machine. An ordinary player has no such token, so the pilot switches itself off silently while the broadcast keeps running. There is one separate pitfall: for an OAuth app in "Testing" status, the refresh token lives for seven days, and authorization drops every week in the middle of work. The fix is to move the app to production with the "Publish app" button; verification is not needed for a single-user app.

Synthesizing one line costs a few cents. The day's pool of 23 lines, about 3.8 thousand characters, cost roughly a dollar, less than a cup of coffee, so "rewrite and re-voice" iterations are painless. The more expensive resources are time and AI-assistant limits: build them into the day's plan rather than discovering them in the evening.

The practical takeaway: for pre-recorded voice content, the chain of draft, mandatory human approval, synthesis, recognition check and feature flag lets you ship a new mechanic in a day without touching the stable build. The key is to run tests with the flag enabled, otherwise the pilot turns into dead code.

Story

Key Questions Answered

What was added and which rules were set?

The radio reads game telemetry from shared memory and does not touch the game's own files. The news is read by the accounting character, who already sends the player voice messages for every "fine," so the voice fits the role. The drivers themselves deliver the commentary on the news. A separate detector handles donations: a script polls DonationAlerts or a similar service, and a donation event triggers a pre-approved, pre-voiced thank-you. There are three constraints.

What are the key details on Flags instead of branches, and two voice-checking loops?

Three config flags (stream_news_pilot, stream_greet_pilot and donation_pilot) are off by default and are enabled separately for each stream. The upsides: there are no forks, the test stand runs the same code, and a rollback is a config change rather than a commit revert. The author turned the downside into a rule: every pilot flag must pass the stand in its enabled state, otherwise you end up with an unnoticed dead branch of code.

What are the key details on The YouTube loop, quotas and cost?

The radio pulls stream metrics (viewers, chat messages, subscribers, Super Chat) through the official YouTube Data API v3, without scraping. The liveBroadcasts.list method finds the active broadcast and returns liveChatId, which is cached for the session. After that, the app polls liveChatMessages.list, which returns up to 200 messages per call. Polling uses about 330 quota units per hour against a daily limit of 10,000, so even a three-hour stream spends roughly a tenth of the daily budget.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…