Skip to main content

Tools for generating noisy and reverberant audio files

Project description

Build Status

maracas is a library for corrupting audio files with additive and convolutive noise. Its objective is to simplify reproducible dataset generation for speech processing (mainly enhancement and ASR).

The usage is really simple and based on the maracas.dataset.Dataset class. Here is a short example:

from maracas.dataset import Dataset
import numpy as np

# Make sure this is reproducible

d = Dataset()

# All files can be added one by one or by folder. Adding a folder will add
# all speech files inside that folder recursively if recursive=True.
d.add_speech_files('/home/jfsantos/data/speech_files/', recursive=True)

# When adding noises, you can give a "nickname" to each noise file. If you do not
# give it a name, the name will be the file name without the '.wav' extension
d.add_noise_files('/home/jfsantos/data/multichannel_noises/restaurant_ch01.wav', name='restaurant')
d.add_noise_files('/home/jfsantos/data/multichannel_noises/cafeteria_ch01.wav', name='cafeteria')
d.add_noise_files('/home/jfsantos/data/multichannel_noises/traffic_ch01.wav', name='traffic')

# Adding reverb files works like adding noise files

# When generating a dataset, you can choose which SNRs will be used and how many
# files per condition you want to be generated. 
d.generate_dataset([-6, -3, 0, 3, 6], '/tmp/noise_plus_reverb_dataset', files_per_condition=5)

Project details

Release history Release notifications

Download files

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

Files for maracas, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size maracas-0.0.1-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size maracas-0.0.1.tar.gz (5.1 kB) File type Source Python version None 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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page