Skip to content

Configuration.md

nathanrish edited this page Aug 23, 2024 · 1 revision

Title: Configuration

Content:

Configuration

To run the YouTube Audio Processor project, you need to configure certain settings using a .env file. This file will specify paths for saving downloaded and processed files.

Setting Up Environment Variables

Create a .env file in the root directory of your project to provide the necessary configuration. Follow these steps:

Creating a .env File

  1. Create the .env File: In the root directory of your project, create a file named .env.

  2. Add Configuration Variables: Open the .env file in a text editor and add the following variables:

    # Directory where the downloaded audio file will be saved
    DOWNLOAD_PATH="./downloads"
    
    # Directory where the processed audio chunks will be saved
    OUTPUT_DIR="./chunks"
    
    • DOWNLOAD_PATH: Set this to the directory where you want the downloaded audio file to be saved. Adjust the path based on your preferences.
    • OUTPUT_DIR: Set this to the directory where you want the processed audio chunks to be saved. Adjust the path as needed.

Example .env File

Here is an example of what your .env file might look like:

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

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

Using the Configuration

The application will read the .env file to get the paths for saving files. Ensure the .env file is correctly set up in the root directory before running the application.

Troubleshooting

If you encounter issues related to configuration:

  • Ensure that the .env file is properly created and located in the root directory.
  • Verify that the paths are correctly set and that the directories are accessible.
  • Consult the Troubleshooting section or open an issue if you need further assistance.

Additional Resources