Git Product home page Git Product logo

dynamic-mixing's Introduction

DYNAMIC MIXING FOR SPEECH PROCESSING (MIX-ON-THE-FLY)

Documentation

An easy-to-use Dynamic Mixing python code for Speech Processing tasks such as Speech Enhancement, Speech Source Separation, Target Speech Extraction, and Speech Augmentation.

Installation

pip install -r requirements.txt

Usage

It is recommended to understand the DynamicMixing arguments before using it. You must provide either the bg_noise_dataset or bb_noise_dataset argument.
Inline python code:

from DynamicMixing import DynamicMixing

mixer = DynamicMixing(bg_noise_dataset = 'audios/bg_noise.txt',
                      bb_noise_dataset = 'audios/bb_noise.txt',
                      rir_dataset = 'audios/rir.txt',
                      snr_range = [-5, 25],
                      sir_range = [-5, 25],
                      sr = 16000,
                      max_bg_noise_to_mix = 3,
                      max_speakers_to_mix = 3,
                      reverb_proportion = 0.5,
                      target_level = -25,
                      target_level_floating_value = 10,
                      allowed_overlapped_bg_noise = True,
                      silence_length = 0.2,
                      saved_dir = 'audios/noisy')

clean_path = 'audios/clean/book_00000_chp_0009_reader_06709_2.wav'
output = mixer.generate(clean_path, save_to_dir = True)

# output is a dictionary, pls check the DynamicMixing code
print("Output: ", output)

# get the noisy data
noisy_y = output['noisy']
print("Noisy data: ", noisy_y)

Generate and save generated noisy audios:

python generate.py \
    --clean_dataset=audios/clean.txt \
    --bg_noise_dataset=audios/bg_noise.txt \
    --bb_noise_dataset=audios/bb_noise.txt \
    --rir_dataset=audios/rir.txt \
    --snr_range=-5,10 \
    --sir_range=-5,25 \
    --max_bg_noise_to_mix=3 \
    --max_speakers_to_mix=3 \
    --reverb_proportion=0.5 \
    --target_level=-25 \
    --target_level_floating_value=10 \
    --allowed_overlapped_bg_noise=true \
    --silence_length=0.2 \
    --saved_dir=audios/noisy 

dynamic-mixing's People

Contributors

khanld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jaedukseo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.