Sphere360 / docs /clean.md
omniaudio's picture
Upload folder using huggingface_hub
77dbe7c verified

Data Cleaning

DataClean

Silent Filtering

Path: toolset/clean/silent/check_new_silent.py

Description: Filters out audio clips where dBFS remains below -35 for over 90% of the duration. (Parameters are adjustable)

Usage Instructions:

  1. Modify the input_directory and output_txt_file parameters in check_new_silent.py.
  2. Run: python check_new_silent.py.

Static Frame Filtering

Path: toolset/clean/static/check_static_ffmpeg.py

Description: Samples 2 frames per second. Consecutive frames are converted to grayscale and compared using MSE - frames with MSE <5 are considered static. Videos with over 85% static frames are filtered. (Parameters are adjustable)

Usage Instructions:

  1. Set the folder_path parameter in check_static_ffmpeg.py.
  2. Execute: python check_static_ffmpeg.py.

Audio-Visual Matching Filtering

Path: toolset/clean/ImageBind/test.py

Description: Uses ImageBind to evaluate the match between video content and audio.

Usage Instructions:

  1. Clone the ImageBind repository into toolset/clean/ImageBind/ and configure python environment.
  2. (Optional) Configure CUDA settings in test.py.
  3. Run: python test.py.

Voice Detection Filtering

Path: toolset/clean/SenseVoice/check_voice.py, toolset/clean/SenseVoice/char_count.py

Description: Uses SenseVoice for voice detection and analysis.

Usage Instructions:

  1. Clone the SenseVoice repository into toolset/clean/SenseVoice/ and configure python environment.
  2. Configure audio_folder in check_voice.py.
  3. Run check_voice.py to output recognized speech text
  4. Execute char_count.py for speech character analysis