Skip to content

Repository files navigation

🔥 Orare AI: Deep Learning Based Automated Digital Human for Video Commentary

Python Version Platform License Status Streamlit

An advanced AI-powered platform for generating realistic talking avatar videos from any text script. The system automates text-to-speech conversion, lip-synced video creation, and avatar animation using deep learning, allowing users to create lifelike virtual presenters for various contexts: news, education, announcements, and more. Features include multiple text-to-speech engine options (online/offline), voice selection, and an intuitive interface available both as a desktop GUI and web app. The solution streamlines content production for anyone seeking dynamic, engaging video presentations.


Watch on YouTube

Ansh Singh Sonkhia on News

✨ Key Features

  • 🎮 Interactive GUI Interface - User-friendly Tkinter-based control panel.
  • 🌐 Streamlit Web App - Run the project in your browser with a modern Streamlit interface.
  • 📰 Smart News Fetching - Automatically retrieves the latest news from Google News based on keywords.
  • 🗣️ Flexible Text-to-Speech - Choose between Google's gTTS (online) and pyttsx3 (offline, multi-voice).
  • 🎤 Voice Selection - Select from available system voices when using pyttsx3.
  • 👄 Advanced Lip-Sync Technology - Wav2Lip integration for perfect mouth movements.
  • 🎬 Professional Video Output - Seamlessly merged audio-video with Lip-Sync.

🆕 New Features (Aug, 2025)

  • Select TTS method: Choose between gTTS (online), pyttsx3 (offline) or coqui ai (offline)
  • Voice selection: Pick from available system voices when using pyttsx3 or coqui-tts
  • All features accessible via the GUI
  • Streamlit web app: Run streamlit run streamlit-app.py for a browser-based experience

Future Features

  • 🏆 Sports-Focused Content - Specialized in sports commentary and match analysis.

📁 Project Structure

AI-Sports-Commentator/
│
├── gui.py                                  # GUI interface built with Tkinter for user interaction and news input
├── main.py                                 # Main controller script that integrates all modules and triggers the complete pipeline
├── boundary_box_detection.py               # Script to detect bounding box coordinates for lips, chin, and cheeks of the avatar image
├── avatar4.png                             # Static avatar image used to generate the lip-synced talking head
├── project GUI screenshot.png              # Screenshot of the GUI to provide a visual preview of the interface
│
├── Wav2Lip/                                # Deep Learning model, that generate the lip-sync video from the image given by the user
│   └── inference.py                        # Lip-sync video generation module using Wav2Lip model
│
├── modules/
│   ├── text_generation.py                  # Automatically fetches and generates news content using web scraping and APIs
│   ├── text_to_speech.py                   # Converts news text into speech using gTTS (online) or pyttsx3 (offline, multi-voice)
│   └── avatar_generation.py                # Coordinates the avatar image and speech audio to generate the final video
│
├── output/
│   └── result_voice.mp4                    # Final output video of the AI avatar reading the news with lip-sync
│
├── click.wav                               # MP3 file containing button sounds used in GUI
├── requirements.txt                        # List of required Python libraries and packages to run the project
└── README.md                               # Project documentation file with setup instructions and project details

⚙️ Setup and Installation

  1. Clone the Repository:

    git clone https://github.com/AnshSinghSonkhia/AI-Commentator-Avatar
    cd AI-Sports-Commentator
  2. Create a Virtual Environment (Optional but Recommended):

    python -m venv venv
    venv\Scripts\activate    # On Windows
    # or
    source venv/bin/activate  # On Linux/Mac
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Download Pre-trained & Setup:

    • Windows
    python setup.py
    • Linux / MacOS
    python3 setup.py
  5. Run the Project:

    • Tkinter GUI:

      python gui.py

      Use the GUI to:

      • Enter a topic and news count, or type your own news text
      • Select TTS method (gTTS or pyttsx3) and voice (if using pyttsx3)
      • Click "Generate Video" to create a lip-synced news anchor video
    • Streamlit Web App:

      streamlit run streamlit-app.py

      Use the browser-based interface for a modern experience. All major features are available in both GUI and Streamlit modes.

🎥 Output

The final output video will be saved as output/result_voice.mp4, showcasing the AI avatar delivering sports commentary in a realistic, lip-synced video format.

📜 Dependencies

  • Python 3.7+
  • gTTS
  • pyttsx3
  • moviepy
  • OpenCV
  • numpy
  • requests
  • newspaper3k
  • GoogleNews
  • tqdm
  • torch, torchvision
  • ffmpeg (installed and added to system path)
  • Pillow (for image processing in GUI)
  • streamlit (for web app)
  • coqui-tts

📬 Contact

For any queries or issues, please contact via GitHub issues or open a pull request.

🌟 Contributors

Brought to you by Ansh Singh Sonkhia, B.Tech in CSE (Artificial Intelligence and Machine Learning)

About

Orare AI: an advanced AI-powered platform for generating realistic talking avatar videos from any text script. The system automates text-to-speech conversion, lip-synced video creation, and avatar animation using deep learning, allowing users to create lifelike virtual presenters for various contexts

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages