Skip to main content

An audio processing tool for detecting and removing silence in audio recordings.

Project description

Audio DeSilencer

Audio DeSilencer is a powerful Python package for audio processing that empowers you to detect and remove silence in audio recordings. Additionally, it provides functionality to facilitate video silence removal using the generated text files.

Features

  • Silence Detection: Identify and segment silent parts of audio based on custom-defined silence thresholds and minimum silence duration.

  • Silence Removal: Effortlessly remove detected silence segments to enhance audio quality and eliminate unnecessary gaps.

  • Text File Generation: Create text files containing the timeline data of silent and non-silent parts, facilitating further processing for video silence removal or in-depth analysis.

  • Command-Line Interface: Seamlessly integrate Audio DeSilencer into your audio and video processing pipelines with an intuitive command-line interface.

Installation

Installation via pip

To install Audio DeSilencer using pip, simply run:

pip install audio-desilencer

Manual Installation

If you prefer not to use pip, you can manually install Audio DeSilencer by following these steps:

  1. Clone the Audio DeSilencer repository:

    git clone https://github.com/BTawaifi/Audio-DeSilencer.git
    
  2. Navigate to the project directory:

    cd Audio-DeSilencer
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    
  4. Now, you can run Audio DeSilencer from the command line:

    python audio-desilencer.py input_audio.mp3 --output_folder output_directory --min_silence_len 100 --threshold -30
    

Command-Line Arguments

  • input_audio.mp3: The path to the input audio file.
  • --output_folder: (Optional) The folder where the output files and timeline data will be saved (default is "output").
  • --min_silence_len: (Optional) The minimum duration of silence (in milliseconds) to be considered as a separate silent part (default is 100 ms).
  • --threshold: (Optional) The silence threshold in dBFS (decibels relative to full scale) used to distinguish between silent and non-silent parts (default is -30 dBFS).

Output

Audio DeSilencer will generate the following output:

  • interview_silent.mp3: Audio file with silence segments removed.
  • interview_non_silent.mp3: Audio file containing only the non-silent parts.
  • silent_parts.txt: Timeline data of silent parts.
  • non_silent_parts.txt: Timeline data of non-silent parts.

Usage Example

Here's a usage example to get you started:

python audio-desilencer.py input_audio.mp3 --output_folder output_directory --min_silence_len 100 --threshold -30

Contributing

Contributions to Audio DeSilencer are highly encouraged! Whether you'd like to report issues or submit pull requests to enhance the tool, your contributions are invaluable. Please refer to the CONTRIBUTING guide for details on how to contribute.

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Audio-DeSilencer-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Audio_DeSilencer-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file Audio-DeSilencer-1.0.1.tar.gz.

File metadata

  • Download URL: Audio-DeSilencer-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for Audio-DeSilencer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9729026cb005f814c9141a414f66707fa22e972fb38cb002b67c64709c6be857
MD5 68c94365f2aee65fe637683fc907808a
BLAKE2b-256 f9769c0acc1ba8db6cc4a0bc965fde2a879c8e564bb5e63dec7d962b6242f681

See more details on using hashes here.

File details

Details for the file Audio_DeSilencer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Audio_DeSilencer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c66458f52917d79e7b54b1749737d2a0fb894f685e12644db71f842b7cabf8
MD5 4c18c6ae0e800340f2a531a1cede9896
BLAKE2b-256 ff5322983d4916f73c235d8158a61d8a18ec72ca08f997344c8bac6e0b6dca3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page