{"id":20620606,"url":"https://github.com/lcav/acousticrakereceiver","last_synced_at":"2025-04-15T12:14:31.213Z","repository":{"id":18663756,"uuid":"21871759","full_name":"LCAV/AcousticRakeReceiver","owner":"LCAV","description":"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 the Cocktail Party by Ivan Dokmanic, Robin Scheibler, and Martin Vetterli.","archived":false,"fork":false,"pushed_at":"2015-01-15T20:53:17.000Z","size":10636,"stargazers_count":54,"open_issues_count":0,"forks_count":18,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-15T12:14:22.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"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-07-15T18:51:19.000Z","updated_at":"2024-09-23T11:14:03.000Z","dependencies_parsed_at":"2022-07-10T07:46:04.519Z","dependency_job_id":null,"html_url":"https://github.com/LCAV/AcousticRakeReceiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FAcousticRakeReceiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FAcousticRakeReceiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FAcousticRakeReceiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LCAV%2FAcousticRakeReceiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LCAV","download_url":"https://codeload.github.com/LCAV/AcousticRakeReceiver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067779,"owners_count":21207396,"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.558Z","updated_at":"2025-04-15T12:14:31.192Z","avatar_url":"https://github.com/LCAV.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Raking the Cocktail Party\n=========================\n\nThis repository contains all the code to reproduce the results of the paper\n[*Raking the Cocktail Party*](http://infoscience.epfl.ch/record/200336).\n\nWe created a simple framework for simulation of room acoustics in object\noriented python and apply it to perform numerical experiments related to\nthis paper. All the figures and sound samples can be recreated by calling\nsimple scripts leveraging this framework. We strongly hope that this code\nwill be useful beyond the scope of this paper and plan to develop it into\na 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\nAbstract\n--------\n\nWe present the concept of an acoustic rake receiver (ARR) — a microphone\nbeamformer that uses echoes to improve the noise and interference suppression.\nThe rake idea is well-known in wireless communications. It involves\nconstructively combining different multipath components that arrive at the\nreceiver antennas. Unlike typical spread-spectrum signals used in wireless\ncommunications, speech signals are not orthogonal to their shifts, which makes\nacoustic raking a more challenging problem. That is why the correct way to\nthink about it is spatial. Instead of explicitly estimating the channel, we\ncreate correspondences between early echoes in time and image sources in space.\nThese multiple sources of the desired and interfering signals offer additional\nspatial diversity that we can exploit in the beamformer design.\n\nWe present several \"intuitive\" and optimal formulations of ARRs, and show\ntheoretically and numerically that the rake formulation of the maximum\nsignal-to-interference-and-noise beamformer offers significant performance\nboosts in terms of noise suppression and interference cancellation. We\naccompany the paper by the complete simulation and processing chain written in\nPython.\n\n\nAuthors\n-------\n\nIvan Dokmanić, Robin Scheibler, 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[Ivan Dokmanić](mailto:ivan[dot]dokmanic[at]epfl[dot]ch) \u003cbr\u003e\nEPFL-IC-LCAV \u003cbr\u003e\nBC Building \u003cbr\u003e\nStation 14 \u003cbr\u003e\n1015 Lausanne\n\n\nSelected results from the paper\n-------------------------------\n\n### Spectrograms and Sound Samples\n\n\u003cimg src=\"https://raw.githubusercontent.com/LCAV/AcousticRakeReceiver/master/figures/spectrograms.png\" width=800\u003e\n\nComparison of the conventional Max-SINR and Rake-Max-SINR beamformer on a real\nspeech sample.  Spectrograms of (A) clean signal of interest, (B) signal\ncorrupted by an interferer and additive white Gaussian noise at the microphone\ninput, outputs of (C) conventional Max-SINR and (D) Rake-Max- SINR beamformers.\nTime naturally goes from left to right, and frequency increases from zero at\nthe bottom up to Fs/2. To highlight the improvement of Rake-Max-SINR over\nMax-SINR, we blow-up three parts of the spectrograms in the lower part of the\nfigure. The boxes and the corresponding part of the original spectrogram are\nnumbered in (A). The numbering is the same but omitted in the rest of the\nfigure for clarity.\n\nThe corresponding sound samples:\n\n* [A](https://github.com/LCAV/AcousticRakeReceiver/raw/master/samples/singing_8000.wav) Desired signal.\n* [B](https://github.com/LCAV/AcousticRakeReceiver/raw/master/output_samples/input_mic.wav) Simulated microphone input signal.\n* [C](https://github.com/LCAV/AcousticRakeReceiver/raw/master/output_samples/output_maxsinr.wav) Output of conventional Max-SINR beamformer.\n* [D](https://github.com/LCAV/AcousticRakeReceiver/raw/master/output_samples/output_rake-maxsinr.wav) Output of proposed  Rake-Max-SINR beamformer.\n\n### Beam Patterns\n\n\u003cimg src=\"https://raw.githubusercontent.com/LCAV/AcousticRakeReceiver/master/figures/beam_scenarios.png\" width=800\u003e\n\nBeam patterns in different scenarios. The rectangular room is 4 by 6 metres and\ncontains a source of interest (•) and an interferer (✭) ((B), (C), (D) only).\nThe first order image sources are also displayed. The weight computation of the\nbeamformer includes the direct source and the first order image sources of both\ndesired source and interferer (when applicable). (A) Rake-Max-SINR, no\ninterferer, (B) Rake-Max-SINR, one interferer, (C) Rake-Max-UDR, one\ninterferer, (D) Rake-Max-SINR, interferer is in direct path.\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/), [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 of the environment.\n\n### PESQ Tool\n\nDownload the [source files](http://www.itu.int/rec/T-REC-P.862-200511-I!Amd2/en) of the ITU P.862\ncompliance tool from the ITU website.\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\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_spectrograms.py\n    run figure_beam_scenarios.py\n    run figure_Measures1.py\n    run figure_Measures2.py\n    run figure_SumNorm.py\n    run figure_quality_sim.py -s 10000\n    run figure_quality_plot.py\n\nThe figures and sound samples generated are collected in `figures` and\n`output_samples`, respectively.\n\nThe script `figure_quality_sim.py` is very heavy computationally. Above, 10000\nis the number of loops. This number can be decreased when testing the code.\nIt is possible to run it also in parallel in the following way. Open a shell\nand type in the following.\n\n    ipcluster start -n \u003cnumber_of_workers\u003e\n    ipython figure_quality_sim.py 10000\n\nOn the first line, we start the ipython workers. Notice that we omit the `-s`\noption on the second line.  This will run `\u003cnumber_of_workers\u003e` parallel jobs.\nBe sure to *deactivate* the MKL extensions if you have them enabled to make sure\nyou have maximum efficiency.\n\nLicense\n-------\n\nCopyright (c) 2014, Ivan Dokmanić, Robin Scheibler, 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\"\u003eAcoustic Rake Receiver\u003c/span\u003e by \u003ca xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://lcav.epfl.ch\" property=\"cc:attributionName\" rel=\"cc:attributionURL\"\u003eIvan Dokmanić, Robin Scheibler, 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%2Facousticrakereceiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcav%2Facousticrakereceiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcav%2Facousticrakereceiver/lists"}