Skip to content

Usage.md

nathanrish edited this page Aug 23, 2024 · 1 revision

Title: Usage

Content:

Usage

This guide provides instructions on how to use the YouTube Audio Processor, including setting up the application, running it, and troubleshooting common issues.

Getting Started

Prerequisites

Before running the application, ensure you have the following installed:

  • Python 3.8 or later
  • Required Python packages (listed in requirements.txt)
  • Git (for cloning the repository)

Setting Up

  1. Clone the Repository

    Open a terminal or command prompt and run:

    git clone https://github.com/nathanrish/youtube_audio_processor.git

    Navigate to the project directory:

    cd youtube_audio_processor
  2. Create a Virtual Environment

    Create a virtual environment to manage dependencies:

    python -m venv venv

    Activate the virtual environment:

    • Linux/macOS:

      source venv/bin/activate
    • Windows:

      venv\Scripts\activate
  3. Install Dependencies

    Install the required packages from requirements.txt:

    pip install -r requirements.txt
  4. Configure Environment Variables

    Create a .env file in the root directory and set the paths for saving files:

    DOWNLOAD_PATH="./downloads"
    OUTPUT_DIR="./chunks"
    

    Ensure the directories specified in DOWNLOAD_PATH and OUTPUT_DIR exist or will be created by the application.

Running the Application

  1. Run the Script

    Execute the main script to start the application:

    python main.py

    The application will prompt you to enter the YouTube video URL you wish to process. Provide the URL when prompted.

  2. Processing Flow

    • The application will download the audio from the specified YouTube video.
    • The audio will be processed and saved in the specified directories.

Troubleshooting

If you encounter issues, consider the following:

  • Dependency Errors: Ensure all dependencies are installed by running pip install -r requirements.txt.
  • Configuration Issues: Verify that the .env file is correctly configured and located in the root directory.
  • File Paths: Ensure the paths specified in DOWNLOAD_PATH and OUTPUT_DIR are correct and writable.

For more detailed troubleshooting, refer to the Troubleshooting section or open an issue on GitHub.

Additional Resources

Feel free to reach out with any questions or issues.