Skip to content

Timi-G/fanTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Football Time Voice App

A Flask-based web app that creates a stadium-style football announcement for the current time. It uses Groq to identify a standout player for a match or competition, then generates a short audio announcement with ElevenLabs.

Features

  • Web UI for entering a football event and generating an announcement
  • Player lookup powered by Groq
  • Audio synthesis with ElevenLabs
  • Transcript and audio download support
  • Local fallback behavior when API credentials are unavailable

Prerequisites

  • Python 3.10+
  • A Groq API key
  • An ElevenLabs API key and voice ID (optional for testing the text-only flow)

Local Setup

  1. Clone the repository and change into the project directory.
  2. Create a virtual environment:
    python -m venv .venv
    source .venv/bin/activate
    On Windows PowerShell:
    py -m venv .venv
    .\.venv\Scripts\Activate.ps1
  3. Install dependencies:
    pip install -r requirements.txt
  4. Create a local environment file:
    copy .env.example .env
    Then update the values in .env with your actual API credentials.

Running the App

Web app

python app.py

Then open http://127.0.0.1:5000 in your browser.

CLI generation

python main.py --event "2022 FIFA World Cup Final"

This generates a transcript and audio file in the output/ directory.

Environment Variables

The app reads the following variables from .env:

  • GROQ_API_KEY – required for player lookup
  • ELEVENLABS_API_KEY – required for audio generation
  • ELEVENLABS_VOICE_ID – required for audio generation

Testing

You can run the basic regression test with:

python -m unittest -q test_app.py

Notes

If Groq or ElevenLabs credentials are missing, the app will still run in a reduced mode and produce a transcript fallback instead of audio.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors