{"id":20620603,"url":"https://github.com/lcav/timedomainacousticrakereceiver","last_synced_at":"2025-06-25T23:04:20.282Z","repository":{"id":21731211,"uuid":"25052913","full_name":"LCAV/TimeDomainAcousticRakeReceiver","owner":"LCAV","description":"Software design and analysis tools for the acoustic rake receiver, a microphone beamformer that uses echoes to improve the noise and interference suppression. Python code to reproduce all the results from Raking Echoes in the Time Domain by Robin Scheibler, Ivan Dokmanic, and Martin Vetterli.","archived":false,"fork":false,"pushed_at":"2015-05-05T12:26:04.000Z","size":33881,"stargazers_count":13,"open_issues_count":0,"forks_count":7,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-06-25T23:04:09.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"AutonomyLab/bebop_autonomy","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LCAV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-10T20:58:06.000Z","updated_at":"2022-06-24T11:15:09.000Z","dependencies_parsed_at":"2022-08-17T18:00:30.801Z","dependency_job_id":null,"html_url":"https://github.com/LCAV/TimeDomainAcousticRakeReceiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LCAV/TimeDomainAcousticRakeReceiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FTimeDomainAcousticRakeReceiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FTimeDomainAcousticRakeReceiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FTimeDomainAcousticRakeReceiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FTimeDomainAcousticRakeReceiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LCAV","download_url":"https://codeload.github.com/LCAV/TimeDomainAcousticRakeReceiver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FTimeDomainAcousticRakeReceiver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261967126,"owners_count":23237662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T12:14:58.153Z","updated_at":"2025-06-25T23:04:20.249Z","avatar_url":"https://github.com/LCAV.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Time Domain Acoustic Rake Receiver\n==================================\n\nThis repository contains all the code to reproduce the results of the paper\n[*Raking Echoes in the Time Domain*](https://infoscience.epfl.ch/record/202223).\n\nUsing the simple python room acoustics framework created for the \n[Acoustic Rake Receiver](https://github.com/LCAV/AcousticRakeReceiver),\nwe demonstrate two time domain beamformer designs that use echoes constructively\nto improve the signal to interference and noise ratio.\nThese designs are explained in details in the paper *Raking Echoes in the Time Domain*.\nAll the figures of the paper can be recreated by calling\nsimple scripts leveraging this framework. In addition to the results of\nthe paper, we include spectrograms and samples of speech samples.\nWe strongly hope that this code will be useful beyond the scope of this paper\nand plan to develop it into a standalone python package in the future.\n\nWe are available for any question or request relating to either the code\nor the theory behind it. Just ask!\n\n\nAbstract\n--------\n\nThe geometry of room acoustics is such that the reverberant signal can be seen\nas a single signal emitted from multiple locations. In analogy with the rake\nreceiver from wireless communications, we propose several beamforming\nstrategies that exploit, rather than suppress, this extra temporal diversity.\nUnlike earlier work in the frequency domain, time domain designs allow to\ncontrol important timing parameters. Particularly important is the ability to\ncontrol perceptually relevant parameters such as the amount of early echoes or\nthe length of the beamformer response.  \n\nRelying on the knowledge of the position of sources, we derive several optimal\nbeamformers. Leveraging perceptual cues, we stray from distortionless design\nand improve interference and noise reduction without degrading the perceptual\nquality. The designs are validated through simulation. Using early echoes is\nshown to strictly improve the signal to interference and noise ratio. Code and\nspeech samples are available online in this repository.\n\n\nAuthors\n-------\n\nRobin Scheibler, Ivan Dokmanić, and Martin Vetterli are with \nLaboratory for Audiovisual Communications ([LCAV](http://lcav.epfl.ch)) at \n[EPFL](http://www.epfl.ch).\n\n\u003cimg src=\"http://lcav.epfl.ch/files/content/sites/lcav/files/images/Home/LCAV_anim_200.gif\"\u003e\n\n#### Contact\n\n[Robin Scheibler](mailto:robin[dot]scheibler[at]epfl[dot]ch) \u003cbr\u003e\nEPFL-IC-LCAV \u003cbr\u003e\nBC Building \u003cbr\u003e\nStation 14 \u003cbr\u003e\n1015 Lausanne\n\n\nRecreate the figures and sound samples\n--------------------------------------\n\nIn a UNIX terminal, run the following script.\n\n    ./make_all_figures.sh\n\nAlternatively, type in the following commands in an ipython shell.\n\n    run figure_beampatterns.py\n    run figure_SINR_sim.py\n    run figure_SINR_plot.py\n\nThe figures and sound samples generated are collected in `figures` and\n`output_samples`, respectively.\n\nThe SINR simulation can be very long. For that reason, we split\nthe simulation loop and the plotting routine into two files.\nWe recommend to first modify the value of the `loops` variable\nin `figure_SINR_sim.py` to 10 and time the simulation to have an\nestimate of the total time required to run the simulatioin.\nThe output of the simulation is saved in `data/SINR_data.npy`.\nThe data can be plotted using `figure_SINR_plot.py`.\n\n\nSimulation Data\n---------------\n\nThe simulation data from the paper is available in `data/SINR_data_Lg30ms_d20ms_20141008.npy`\nand can be processed with `figure_SINR_plot.py`.\n\n\nSound Samples and Spectrograms\n------------------------------\n\nWhile it was omitted in the paper for space reasons, we provide\nhere simulation results for speech samples.\n\n* [sample1](https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/output_samples/input.wav) \n  Simulated microphone input signal.\n* [sample2](https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/output_samples/output_DirectMVDR.wav) \n  Output of MVDR using the direct sound only.\n* [sample3](https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/output_samples/output_RakeMVDR.wav) \n  Output of Rake MVDR using the direct sound and 1st order echoes.\n* [sample4](https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/output_samples/output_DirectPerceptual.wav) \n  Output of Perceptual beamformer using the direct sound only.\n* [sample5](https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/output_samples/output_RakePerceptual.wav) \n  Output of Rake Perceptual using the direct sound and 1st order echoes.\n\nThe spectrogram of all samples as well as the desired sound are provided.\n\n\u003cimg src=\"https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/figures/spectrograms.png\"\u003e\n\nThe samples and the spectrograms are created by the script `figure_spectrogam_and_samples.py`.\n\n\nMeasured Room Impulse Responses\n-------------------------------\n\nBeyond the simulation results presented in the paper, the raking beamformers\nwere validated with room impulse responses (RIR) measured in a classroom at\nEPFL. The RIR are stored as wav files in `BC329_RIR_8kHz/RIRs` and the\nmethodology for the measurements is outlined in `BC329_RIR_8kHz/README.md`.\n\nThe RIR were measured for a static linear array of 8 microphones spaced by 8\ncm. RIRs were measured for 12 different source positions. In the validation all\n132 combinations of desired/interfering sources are tested. Sound propagation\nis simulated by convolving speech samples with the RIR. \n\nUsing the measured room dimension and locations of sources, as well as\napproximate reflection coefficients for the walls, both Rake MVDR and Rake\nPerceptual beamformers are computed. The output of the beamformers is evaluated\nwith respect to the clean desired speech signal using the perceptual evaluation\nof speech quality (PESQ) metric.\n\nEven though the calibration of room characteristics, microphones, and speakers locations\nwas only approximate, we observe the same kind of thread than in the pure SINR simulation.\nThat is speech quality is improved by using extra reflections in the room.\n\n\u003cimg src=\"https://raw.githubusercontent.com/LCAV/TimeDomainAcousticRakeReceiver/master/figures/pesq_measured_rir.png\"\u003e\n\nThe simulation can be run as `ipython figure_Experiment.py 132` and the output of the\nsimulation can be plotted using `ipython figure_Experiment_plot.py` (with optional\nsimulation output filename argument).\n\n\nExtra Scripts\n-------------\n\nWe also include extra scripts that let us play with the different beamformers.\nThe script names should be self-explanatory.\n\n    RakeLstSqFromFD.py\n    RakeMVDR.py\n    RakeMaxSINR.py\n    RakeMaxUDR.py\n    RakeOF.py\n    RakePerceptual.py\n\n\nDependencies\n------------\n\n* A working distribution of [Python 2.7](https://www.python.org/downloads/).\n* The code relies heavily on [Numpy](http://www.numpy.org/),\n  [Scipy](http://www.scipy.org/), and [matplotlib](http://matplotlib.org).\n* We use the distribution [anaconda](https://store.continuum.io/cshop/anaconda/) to simplify the setup\n  of the environment.\n* Computations are very heavy and we use the\n  [MKL](https://store.continuum.io/cshop/mkl-optimizations/) extension of\n  Anaconda to speed things up. There is a [free license](https://store.continuum.io/cshop/academicanaconda) for academics.\n* An implementation of PESQ is needed to run `figure_Experiment.py`. In a pinch, the reference\n  implementation of the ITU can be used. To compile it follow the instructions.\n\n### PESQ Tool\n\nDownload the [source files](http://www.itu.int/rec/T-REC-P.862-200511-I!Amd2/en) \nof the ITU P.862 compliance tool from the ITU website.  Follow the instructions\nto compile the tool and copy the executable produced in the `bin` directory.\n\n#### Unix compilation (Linux/Mac OS X)\n\nExecute the following sequence of commands to get to the source code.\n\n    mkdir PESQ\n    cd PESQ\n    wget 'https://www.itu.int/rec/dologin_pub.asp?lang=e\u0026id=T-REC-P.862-200511-I!Amd2!SOFT-ZST-E\u0026type=items'\n    unzip dologin_pub.asp\\?lang\\=e\\\u0026id\\=T-REC-P.862-200511-I\\!Amd2\\!SOFT-ZST-E\\\u0026type\\=items\n    cd Software\n    unzip 'P862_annex_A_2005_CD  wav final.zip'\n    cd P862_annex_A_2005_CD/source/\n\nIn the `Software/P862_annex_A_2005_CD/source/` directory, create a file called `Makefile` and copy\nthe following into it.\n\n    CC=gcc\n    CFLAGS=-O2\n\n    OBJS=dsp.o pesqdsp.o pesqio.o pesqmod.o pesqmain.o\n    DEPS=dsp.h pesq.h pesqpar.h\n\n    %.o: %.c $(DEPS)\n      $(CC) -c -o $@ $\u003c $(CFLAGS)\n\n    pesq: $(OBJS)\n      $(CC) -o $@ $^ $(CFLAGS)\n\n    .PHONY : clean\n    clean :\n      -rm pesq $(OBJS)\n\nExecute compilation by typing this.\n\n    make pesq\n\nFinally move the `pesq` binary to `\u003crepo_root\u003e/bin/`.\n\nNotes:\n* The files input to the pesq utility must be 16 bit PCM wav files.\n* File names longer than 14 characters (suffix included) cause the utility to\n  crash with the message `Abort trap(6)` or similar.\n\n#### Windows compilation\n\n1. Open visual studio, create a new project from existing files and select the directory\n  containing the source code of PESQ (`Software\\P862_annex_A_2005_CD\\source\\`).\n\n          FILE -\u003e New -\u003e Project From Existing Code...\n\n2. Select `Visual C++` from the dropdown menu, then next.\n    * *Project file location* : directory containing source code of pesq (`Software\\P862_annex_A_2005_CD\\source\\`).\n    * *Project Name* : pesq\n    * Then next.\n    * As *project type*, select `Console application` project.\n    * Then finish.\n\n3. Go to\n\n          BUILD -\u003e Configuration Manager...\n\n    and change active solution configuration from `Debug` to `Release`. Then Close.\n\n4. Then \n\n          BUILD -\u003e Build Solution\n\n5. Copy the executable `Release\\pesq.exe` to the bin folder.\n\n*(tested with Microsoft Windows Server 2012)*\n\n\nSystems Tested\n--------------\n\n###Linux\n\n| Machine | IBM System X iDataPlex dx360 M3 |\n|---------|---------------------------------|\n| System  | Ubuntu 12.04.5                  |\n| CPU     | 2x X5675                        |\n| RAM     | 96 GB                           |\n\n    System Info:\n    Linux 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux\n\n    Python Info:\n    Python 2.7.8 :: Anaconda 2.0.1 (64-bit)\n\n    Python Packages Info:\n    accelerate                1.7.0               np19py27_p0  \n    anaconda                  2.0.1                np18py27_0  \n    ipython                   2.1.0                    py27_2  \n    ipython-notebook          2.1.0                    py27_0  \n    ipython-qtconsole         2.1.0                    py27_0  \n    matplotlib                1.3.1                np18py27_1  \n    mkl                       11.1                np19py27_p3  \n    mkl-rt                    11.1                         p0  \n    mkl-service               1.0.0                   py27_p1  \n    mklfft                    1.0                 np19py27_p0  \n    numpy                     1.9.0                   py27_p0  [mkl]\n    scipy                     0.14.0              np19py27_p0  [mkl]\n\n###OS X\n\n| Machine | MacBook Pro Retina 15-inch, Early 2013 |\n|---------|----------------------------------------|\n| System  | OS X Maverick 10.9.4                   |\n| CPU     | Intel Core i7                          |\n| RAM     | 16 GB                                  |\n\n    System Info:\n    Darwin 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64\n\n    Python Info:\n    Python 2.7.8 :: Anaconda 2.0.1 (x86_64)\n\n    Python Packages Info:\n    accelerate                1.7.0               np19py27_p0  \n    anaconda                  2.0.1                np18py27_0  \n    ipython                   2.1.0                    py27_2  \n    ipython-notebook          2.1.0                    py27_0  \n    ipython-qtconsole         2.1.0                    py27_0  \n    matplotlib                1.3.1                np18py27_1  \n    mkl                       11.1                np19py27_p3  \n    mkl-rt                    11.1                         p0  \n    mkl-service               1.0.0                   py27_p1  \n    mklfft                    1.0                 np19py27_p0  \n    numpy                     1.9.0                   py27_p0  [mkl]\n    scipy                     0.14.0              np19py27_p0  [mkl]\n\n\nLicense\n-------\n\nCopyright (c) 2014, Robin Scheibler, Ivan Dokmanić, Martin Vetterli\n\nThis code is free to reuse for non-commercial purpose such as academic or\neducational. For any other use, please contact the authors.\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003e\u003cspan xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\"\u003eTime Domain Acoustic Rake Receiver\u003c/span\u003e by \u003ca xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://lcav.epfl.ch\" property=\"cc:attributionName\" rel=\"cc:attributionURL\"\u003eRobin Scheibler, Ivan Dokmanić, Martin Vetterli\u003c/a\u003e is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003eCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License\u003c/a\u003e.\u003cbr /\u003eBased on a work at \u003ca xmlns:dct=\"http://purl.org/dc/terms/\" href=\"https://github.com/LCAV/AcousticRakeReceiver\" rel=\"dct:source\"\u003ehttps://github.com/LCAV/AcousticRakeReceiver\u003c/a\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcav%2Ftimedomainacousticrakereceiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcav%2Ftimedomainacousticrakereceiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcav%2Ftimedomainacousticrakereceiver/lists"}