A-spade

Card games 146687 640

A-SPADE: the Analysis SParse Audio DEclipper is a software to improve the sound quality of saturated audio files


Please log in to perform a job with this app.


Description

Clipping, also known as saturation, is a comon phenomenon leading to sometimes seriously distorted audio recordings. Declipping consists in performing the inverse process, to restore saturated audio recordings and improve their quality. A-SPADE is a declipping algorithm developed by PANAMA (a joint project-team between Inria and CNRS). It is based on on the expression of declipping as a linear inverse problem and the use of analysis sparse regularization in the time-frequency domain. To the best of our knowledge SPADE achieves state-of-the-art declipping quality.

For more information, please visit this website: spade.inria.fr. You can also contact us through this form.

Before using the software, have a look at this documentation and at the “Demo” tab which provides some input examples (parameters and audio files) that can be used with A-SPADE. The “Demo” tab also provides output examples.

Usage

A-SPADE will give you the desaturated version of your input signal as a .wav file. Supported input formats are .wav, .mp3, .mp4, .m4a, .ogg, .flac. Long multi-channel files are eligible for declipping but this online application, as a trial version of the software, will process only the first 2 channels and the first 30 seconds of your input audio files. If you are interested in processing longer excerpts or more than stereophonic recordings, please contact us.

To use the software, follow these steps:

  1. Upload your audio file(s) with the “+ Upload File” button.

    • a mandatory clipped input file;
    • an optional clean reference (Warning: If you have a clean reference make sure that it is recorded with the same sampling rate as the saturated one, that it has the same channel number and the same duration but a different name).
  2. In the “Version” pop-up menu, verify that the latest software version is selected.

  3. In the “Parameters” field type (all parameters must be separated using a single whitespace - see the image below):

    • Mandatory: the name of your clipped file as first parameter (yes, you do have to provide it, A||go cannot guess it);
    • Optional: the other parameters (in any order):
      • The name of the reference file (to compute the Signal to Distortion Ratio);
      • One preset allowing some tuning of the algorithm: “HighQuality”, “Average” (default value), “Fastest”;
      • One numerical value (offset in dB) used to adjust the estimated clipping threshold (0 is the default value). With a negative offset value more samples will be considered as clipped and then modified by the algorithm.

    image

  4. Start your declipping by clicking on the “Run this job” button.

  5. Once your job is finished you should be able to listen to the result and save your declipped signal in a file named “Declipped_<name of your input file>.wav”. As in the screenshot below, if you provided a reference signal you will get the SDR (Signal to Distortion Ration in dB) measurements before and after processing in the allgo.log file.

  6. To try the application with other files and submit a new job, click on the “A-SPADE” link in the left top corner of the result page as shown below.

image

Processing time

The processing time depends on the chosen preset (“Fastest”, “Average”, “HighQuality”) and increases with:

  • the number of clipped samples;
  • the sampling frequency;
  • the file duration;
  • the number of channels.

With the 20 seconds long mono demo file sampled at 16 kHz and clipped at 3dB SDR, the processing time with the “HighQuality” preset is about 7 min. With the “Fastest” preset, the computing time is around 20 seconds and respectively 1 minute for the “Average” preset.

Download the Matlab implementation of A-SPADE

You can download the Matlab code for tight frame-based A-SPADE here.

Warning: this software version is limited to 64 bits per samples natively clipped .wav files (input files have to be clipped in 64 bits PCM and not transcoded from lossy format for this software version). This limitation is removed in the online version used on A||GO.

Licence and Credits

You may exploit this software for a non-commercial scientific purpose provided you mention it in any written work or software you derive from its use. Within a published article, paper or report, the software must appear in the bibliographical references as:
S. Kitic, N. Bertin and R.Gribonval. Sparsity and cosparsity for audio declipping: a flexible non-convex approach. In Latent Variable Analysis and Signal Separation, Liberec, 2015.

The examples shown in the "Demo" section are from the RWC Jazz Database: M. Goto, H. Hashiguchi, T. Nishimura, and R. Oka: RWC Music Database: Popular, Classical, and Jazz Music Databases In Proceedings of the 3rd International Conference on Music Information Retrieval (ISMIR 2002), 2002.

In input :

clipped.wav


original.wav



In output :

Declipped_clipped.wav
allgo.log
User parameters:
Clipped input signal: clipped.wav
Original input signal: original.wav
Used preset: HighQuality
Sensitivity: 0.000000 dB

Processing channel 1/1.
Estimated clipped samples threshold: -26.124956 dB
201789 clipped samples detected on a total of 322304 samples.
Declipping in progress: 100%
New SDR: 10.46dB 	 Old SDR: 3dB
Improvement: 7.46dB
Time elapsed: 745.73s

Declipping succeded!

====  ALLGO JOB SUCCESS  ====

16/01/2018 : Version 1.5,
21/12/2017 : Version 1.4,
26/04/2017 : Version 1.3,
22/03/2017 : Version 1.2,
28/02/2017 : Version 1.1,
06/10/2016 : Version 1.0,

How to use our REST API :

Think to check your private token in your account first. You can find more detail in our documentation tab.

This app id is : 134

This curl command will create a job, and return your job url, and also the average execution time

files and/or dataset are optionnal, think to remove them if not wanted
curl -H 'Authorization: Token token=<your_private_token>' -X POST
-F job[webapp_id]=134
-F job[param]=""
-F job[queue]=standard
-F files[0]=@test.txt
-F files[1]=@test2.csv
-F job[file_url]=<my_file_url>
-F job[dataset]=<my_dataset_name> https://allgo.inria.fr/api/v1/jobs

Then, check your job to get the url files with :

curl -H 'Authorization: Token token=<your_private_token>' -X GET https://allgo.inria.fr/api/v1/jobs/<job_id>