Youtube-Whisper / README.md
danilotpnta's picture
update
61468be
metadata
title: Youtube Whisper
emoji: 🐢
colorFrom: purple
colorTo: pink
sdk: docker
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit

Youtube-Whisper

A simple Gradio app that transcribes YouTube videos by extracting audio and using OpenAI’s Whisper model for transcription. Paste a YouTube link and get the video’s audio transcribed into text.

Demo

Requirements

  • Conda installed (for managing environments)
  • Python 3.9 or above
  • FFmpeg installed (required for audio conversion)

Installation

Step 1: Clone the Repository

git clone https://github.com/danilotpnta/Youtube-Whisper.git
cd Youtube-Whisper

Step 2: Install FFmpeg

You need FFmpeg for processing the audio. Install it based on your operating system:

  • macOS: Install FFmpeg via Homebrew:

    brew install ffmpeg
    
  • Ubuntu/Linux: Install FFmpeg via apt:

    sudo apt update
    sudo apt install ffmpeg
    
  • Windows:

    • Download FFmpeg from the official website: FFmpeg Download.
    • Extract the files and add the bin folder to your system’s PATH environment variable. For detailed instructions on adding FFmpeg to PATH, you can follow this guide.

Verify the installation by running:

ffmpeg -version

Step 3: Create and Activate the Conda Environment

To set up the environment using the provided environment.yml file:

conda env create -f environment.yml

Once the environment is created, activate it with:

conda activate yt-whisper

Step 4: Run the App

Once the environment is active, you can launch the Gradio app with:

python app.py

This will start a local server for the app, and you can access it by visiting the URL printed in the terminal (usually http://localhost:7860/).

Troubleshooting

  1. FFmpeg Not Found: If you see an error related to ffmpeg not found, ensure FFmpeg is installed and added to your system's PATH. You can also specify its location manually in the script by setting ffmpeg_location.

  2. Pytube Errors: If you encounter issues with pytube, ensure you’re using the yt-dlp version and that your URL is correctly formatted.

  3. Update Dependencies: Ensure that pip and conda are up to date:

    conda update conda
    pip install --upgrade pip
    

License

This project is licensed under the MIT License. See the LICENSE file for more details.