Skip to content

This tool allows you to transcribe YouTube videos. It uses OpenAI's Whisper model for transcription.

License

Notifications You must be signed in to change notification settings

PierrunoYT/YT2Text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YT2Text: YouTube Transcriber

This tool allows you to transcribe YouTube videos. It uses OpenAI's Whisper model for transcription.

Features

  • Download audio from YouTube videos
  • Transcribe audio using OpenAI's Whisper model with:
    • 99% transcription accuracy
    • Support for 98+ languages with auto-detection
    • Robust handling of accents and background noise
    • High-quality speech recognition
  • Save transcriptions to a text file
  • Secure storage of OpenAI API key

Prerequisites

See .env.example for environment variable setup. The actual environment file will be created automatically when you run the script.

Installation

Windows

  1. Clone this repository:

    git clone https://github.com/PierrunoYT/YT2Text.git
    cd YT2Text
  2. Create and activate a virtual environment:

    python -m venv venv
    venv\Scripts\activate
  3. Install required packages:

    pip install -r requirements.txt

macOS

  1. Clone this repository:

    git clone https://github.com/PierrunoYT/YT2Text.git
    cd YT2Text
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install required packages:

    pip install -r requirements.txt

Linux

  1. Clone this repository:

    git clone https://github.com/PierrunoYT/YT2Text.git
    cd YT2Text
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install required packages:

    pip install -r requirements.txt

Usage

  1. Run the script:

    python youtube_transcriber.py    # Windows
    python3 youtube_transcriber.py   # macOS/Linux
  2. Follow the prompts to:

    • Enter your OpenAI API key (only required on first run)
    • Provide a YouTube video URL
    • Specify the output file name for the transcription
  3. The script will download the audio, transcribe it, and save the transcription to a file.

Notes

  • The OpenAI API key is stored securely in your home directory.
  • Temporary audio files are automatically cleaned up after processing.
  • On Linux and macOS, you might need to use python3 instead of python depending on your system configuration.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 PierrunoYT

About

This tool allows you to transcribe YouTube videos. It uses OpenAI's Whisper model for transcription.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages