DEV Community

Cover image for PassionCast: I Built an AI Hype Man for World Cup Fans Using Gemini + ElevenLabs

PassionCast: I Built an AI Hype Man for World Cup Fans Using Gemini + ElevenLabs

Sarvar Nadaf on July 12, 2026

This is a submission for Weekend Challenge: Passion Edition What I Built The World Cup quarter-finals are on right now. I'm watching ma...
Collapse
 
steven_r_404 profile image
Steven Ray

Its really impressive 👍🏻

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

Thank You 🙏🏻

Collapse
 
steven_r_404 profile image
Steven Ray

By any chance can i test this in realtime? i mean its asking for the api keys for generating output are they free?

Thread Thread
 
sarvar_04 profile image
Sarvar Nadaf

Yes you can test it both the keys are available for free tier usage.

Collapse
 
mustkhim_inamdar profile image
Mustkhim Inamdar

Hi it’s interesting use case, good work. For my understanding I have couple of questions, did you use structured JSON output from Gemini, or did you parse free-form text? And How do you prevent Gemini from hallucinating player names, scores, or match events?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf • Edited

Good questions. im using free form text not structured json. The script goes straight into elevenLabs as speech so all I need is clean spoken prose. The prompt tells gemini plain text only no markdown no stage directions and it respects that consistently at 150 to 200 words. On hallucination I don't fully prevent it and thats a deliberate choice. This generates hype commentary not factual reporting. If the AI says "remember that night in 2014" and the actual year was 2010 the emotional impact still lands for a hype speech i reduce the risk by including real context per team in the prompt (rivals, culture and history) which anchors gemini to real info and for 48 wellknown World Cup nations its training data is solid on actual football history. Where it breaks is smaller nations with thin football coverage but that's an acceptable tradeoff when the goal is emotional energy over encyclopedic accuracy.

Collapse
 
sanket_patharkar profile image
Sanket Patharkar

Impressive project! The decision to use a higher Gemini temperature along with carefully engineered prompts clearly paid off. Pairing that with ElevenLabs voice tuning for emotional delivery makes the experience much more immersive. Nicely executed!

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

Yes true. Thanks for thoughtful reply 🤠

Collapse
 
techie_1414 profile image
Techie

It’s good one

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

Thank You !

Collapse
 
salman_khan_c31307505285e profile image
Salmankhan

Wow this one is epic and interesting

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

Thank You 👍🏻

Collapse
 
pratikponde profile image
Pratik Ponde

Hey @sarvar_04 The voice experience is especially impressive. But How did you decide on the tone and personality of the AI commentator?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

Trial and error i split into 3 personas (cinematic narrator, energetic commentator, poetic storyteller) matched to content types, then tweaked elevenlabs stability down to 0.4 and style up to 0.6 until it stopped sounding like a newsreader and started sounding like a real commentator losing their mind over a goal the personality comes from gemini's prompt the emotion comes from voice settings and both halves need each other.

Collapse
 
inamdar profile image
Naisha

Hi sir, I wanted to understand, did you stream the audio as it was generated, or wait for the complete audio before playback?

Collapse
 
sarvar_04 profile image
Sarvar Nadaf

i wait for the complete audio before playback elevenlabs returns the full mp3 as a blob I create an object url from it set it as the audio source and then autoplay. Streaming would feel smoother for longer clips but for 45 to 60 secs of audio the wait is only a few secs and it keeps the code dead simple. one fetch one blob done.