Member-only story

Building an AI-Powered Football Commentator

Generate commentary audio using OpenAI, ElevenLabs and open-source football data

Michael J. Fordham
Better Programming
4 min readApr 10, 2023

--

Photo by Gustavo Ferreira

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…

--

--

Michael J. Fordham
Michael J. Fordham

Written by Michael J. Fordham

Software engineer interested in the future of innovative UX. I mainly write about design, development, data and AI. www.michaeljfordham.com

Responses (8)

What are your thoughts?