Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

generating mixture of noise and non-noise sound files

Project description

This is commandline utility for generating mixed audio and noise files.
It is required to have valid audio files and the same number of noise files
in two different directories. For simplicity we name audio files with an increasing sequenced of integers (as shown below)
A utility create_noise_files.py creates noise files. However, valid audio wav files needs to
be provided.

How to install:

>pip install soundmixture

>gensound --help
usage: gensound [-h] noisedir audiodir mixeddir SNR

Generate mixed audio noise files

positional arguments:
noisedir spcefiy where the noise files are located
audiodir spcefiy where the audio files are located
mixeddir spcefiy where the output dir for mixed files audio/noise are
located
SNR spcefiy SNR level

optional arguments:
-h, --help show this help message and exit


example:
>gensound soundmixture/data/noise/ soundmixture/data/audio/ ./out -40

output:
audio/noise mixed files are:
./data/mixedaudZorro/mixed_1.wav
./data/mixedaudZorro/mixed_10.wav
./data/mixedaudZorro/mixed_2.wav
./data/mixedaudZorro/mixed_3.wav
./data/mixedaudZorro/mixed_4.wav
./data/mixedaudZorro/mixed_5.wav
./data/mixedaudZorro/mixed_6.wav
./data/mixedaudZorro/mixed_7.wav
./data/mixedaudZorro/mixed_8.wav
./data/mixedaudZorro/mixed_9.wav


Input noise files are located at:
ls -1 data/noise/
noise1.wav
noise10.wav
noise2.wav
noise3.wav
noise4.wav
noise5.wav
noise6.wav
noise7.wav
noise8.wav
noise9.wav

Input audio files are located at:
ls -1 data/audio/
1.wav
10.wav
2.wav
3.wav
4.wav
5.wav
6.wav
7.wav
8.wav
9.wav

Note: a set of sample noise and audio files can be found in the data directory of where the package is installed: pip show soundmixture


Project details


Release history Release notifications

This version

0.9

Download files

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

Files for soundmixture, version 0.9
Filename, size File type Python version Upload date Hashes
Filename, size soundmixture-0.9-py2-none-any.whl (3.7 MB) File type Wheel Python version py2 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page