Building an AI-powered Football Commentator

If you’ve ever played a game like FIFA or PES, you’ll know that sometimes the pre-recorded commentary leaves you less immersed than you’d like.

A commentator could be reading the team sheet, and suddenly they interrupt themselves by screaming a player’s name.

Or maybe you’ve just heard the same match summary one too many times over the course of a few seasons.

These tiny annoyances made me wonder if there could be a way to improve that experience.

So I decided to try my hand at building a proof of concept which solves these problems.

The flow I wanted was:

  1. Input some largely unstructured football data (e.g. match stats)
  2. Have a commentary script generated using those stats, in the style of an experienced commentator
  3. Then have a realistic-sounding voice read out the generated script

I selected a few different technologies for this project:

  • React/Next.js for the frontend and some APIs (I had never built with React before, I am firmly an Angular dev so I wanted to see what all the fuss was about)
  • GPT 3.5 Turbo for the commentary generation, as it is both impressive in its generations and cheap per token generated
  • ElevenLabs text-to-voice service, to generate a realistic-sounding voice rather than a synthetic robotic voice

Website 

Tags: 3.5 GPT robotic