Skip to content

This repository allows users to chunk videos with customizable controls for enhanced processing. Batch processing video chunks enhances content accuracy and detail, significantly reducing omissions in speech recognition.

Notifications You must be signed in to change notification settings

RealImage/labs-aitt-batch_processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Audio Splitting Program

This tool splits an audio file into smaller chunks based on silence detection. It uses the pydub library to handle audio processing.

Features

  • Splits audio based on silence detection.
  • Merges chunks to ensure they do not exceed a specified length.
  • Saves the resulting chunks as .wav files in a specified output directory.

Requirements

  • Python 3.x
  • pydub library
  • ffmpeg or libav installed on your system

Installation

  1. Install the required Python packages:

    pip install pydub
  2. Ensure ffmpeg or libav is installed on your system. You can download ffmpeg from here.

  3. ffmpeg for mac

     brew install ffmpeg

Usage

  1. Place your audio file in the same directory as the script or update the audio_file variable with the correct path.

  2. Run the script:

    python split_audio.py
  3. The script will split the audio file into chunks and save them in the specified output directory (default is /content/new_audio_chunks/).

Configuration

You can adjust the following parameters in the split_audio function:

  • silence_thresh: Threshold for silence detection (default is -40 dBFS).
  • min_silence_len: Minimum length of silence to consider for splitting (default is 500 ms).
  • chunk_length: Maximum length of each chunk (default is 120000 ms or 2 minutes).
  • output_dir: Directory to save the split audio chunks (default is /content/new_audio_chunks/).

Example

audio_file = '<your_audio_file_path>'  # Update this path to your local audio file
split_audio(audio_file)

Conclusion

Batch processing video chunks for LLM testing significantly enhances the efficiency and scalability of the evaluation process. This method allows for the simultaneous analysis of multiple segments, leading to more accurate and detailed content capture, ultimately reducing the amount of omitted speech. While this approach optimizes resource utilization, careful attention must be paid to context preservation to prevent loss of continuity in the model's understanding, ensuring coherent and comprehensive outputs.

About

This repository allows users to chunk videos with customizable controls for enhanced processing. Batch processing video chunks enhances content accuracy and detail, significantly reducing omissions in speech recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages