Dataset Open Access

# Dataset for: Application of Machine Learning for the Spatial Analysis of Binaural Room Impulse Responses

Michael Lovedee-Turner; Damian Murphy

### DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<identifier identifierType="DOI">10.5281/zenodo.1038021</identifier>
<creators>
<creator>
<creatorName>Michael Lovedee-Turner</creatorName>
<nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0001-6898-1894</nameIdentifier>
<affiliation>University of York</affiliation>
</creator>
<creator>
<creatorName>Damian Murphy</creatorName>
<nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0002-6676-9459</nameIdentifier>
<affiliation>University of York</affiliation>
</creator>
</creators>
<titles>
<title>Dataset for: Application of Machine Learning for the Spatial Analysis of Binaural Room Impulse Responses</title>
</titles>
<publisher>Zenodo</publisher>
<publicationYear>2017</publicationYear>
<subjects>
<subject>Machine-Hearing, Machine-Learning, Binaural Room Impulse Responses, Spatial Analysis, Direction of Arrival</subject>
</subjects>
<dates>
<date dateType="Issued">2017-10-27</date>
</dates>
<language>en</language>
<resourceType resourceTypeGeneral="Dataset"/>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/1038021</alternateIdentifier>
</alternateIdentifiers>
<relatedIdentifiers>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsSupplementTo">10.3390/app8010105</relatedIdentifier>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.1038020</relatedIdentifier>
<relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://zenodo.org/communities/uoy-audiolab</relatedIdentifier>
</relatedIdentifiers>
<version>1</version>
<rightsList>
<rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
</rightsList>
<descriptions>
<description descriptionType="Abstract">&lt;p&gt;This repository contains supplementary material for the paper titled Application of Machine Learning for the Spatial&lt;br&gt;
Analysis of Binaural Room Impulse Responses&amp;#39; Available at: &lt;a href="http://dx.doi.org/10.3390/app8010105"&gt;dx.doi.org/10.3390/app8010105&lt;/a&gt;&amp;nbsp;. These programs and audio files are distributed in the hopes that they will prove useful under the Creative Commons Attribution 4.0, with no warranty; or the implied warranty of merchantability or fitness for a particular problem. Please give appropriate credit for use of the material provided in this repository back to the author.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;In order to use the MatLab code the Auditory Toolbox by Malcolm Slaney [1] and the Cochleagram function distributed by Bin Gao [2] are required.&lt;/p&gt;

&lt;p&gt;The python scrips require the following Python libraries to be installed: Numpy[3], SciPy[4] and Tensorflow [5].&lt;/p&gt;

&lt;p&gt;The MatLab code was tested using MatLab R2017a on a Computer running windows 7.&lt;/p&gt;

&lt;p&gt;The python code was tested using Python 3.2.5, using an anaconda Python environment - in windows command line.&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;The repository contains:&lt;/p&gt;

&lt;p&gt;Folders:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
1.) neg90 - This folder contains the gaussian normalisation parameters stored as text files and the weights and biases for the trained neural network - these are all for the -90&amp;deg; rotation neural network.&lt;/p&gt;

&lt;p&gt;2.) pos90 - This folder contains the gaussian normalisation parameters stored as text files and the weights and biases for the trained neural network - these are all for the +90&amp;deg; rotation neural network.&lt;/p&gt;

&lt;p&gt;3.) testData - this folder contains pre-generated test data for the different binaural dummy head microphones, speaker, and signal type combinations.&lt;/p&gt;

&lt;p&gt;Python Scripts:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
1.) AnalyseDoA.py - A python script that can be run to test the neural network using the pre-generated test data - running the script will allow the user to input the binaural dummy head, speaker, and signal type. The important variables generated by this script are DoA - the direction of arrival for each signal in the feature vector, and yDiff - the difference between the predicted DoA and the expected direction of arrival&lt;/p&gt;

&lt;p&gt;2.) DirectionAnalysis.py - This python file contains a set of function that are used to define the neural network, and run it. The function called DoAPrediction takes the feature vector generated by the MatLab code as its input argument, these features will then be passed to the neural network, and the output of this function is the direction of arrival predicted by the neural network for each signal. The functions: DoAAnalysis_neg90 and DoAAnalysis_pos90 are called by the DoAPrediction function, these functions create the neural network using the NN function, import the weights and biases, and passes the feature matrix (provided as input) through the neural network - the output of these functions are the predicted direction of arrival.&lt;/p&gt;

&lt;p&gt;MatLab files:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
1.) runAnalysis.m - This&amp;nbsp;MatLab script&amp;nbsp;analyses the dataset provided as part of this repository. Users can change the variables head (&amp;#39;KEMAR&amp;#39; or &amp;#39;KU100&amp;#39;), signalType (&amp;#39;directSound&amp;#39; or &amp;#39;reflection&amp;#39;), and speaker (&amp;#39;EquatorD5&amp;#39; or &amp;#39;Genelec8030&amp;#39;). This script will produce the gaussian normalised feature vector and expected direction of arrival for all signals with the defined head, signal type, and speaker combination. These variables are then saved in .mat files so they can be imported by the python scripts.&lt;/p&gt;

&lt;p&gt;2.) BinauralModelCochlea.m - This MatLab function analyses a given binaural signal and outputs the interaural cross-correlation, interaural level difference, interaural time difference, the cochlea output for the left and right channel and the centre frequencies of the gammatone filter band. The input variables are: IR - the signal to be analysed, N - the number of gammatone filters, freqLow - the lowest centre frequency of the gammatone filter bank (centre frequency of the first gammatone filter), and freqHigh - the highest centre frequency of the gammatone filter bank (the centre frequency of the Nth gammatone filter). This function requires Malcolm Slaney&amp;#39;s Auditory Toolbox [1] and Bin Gao&amp;#39;s Cochleagram function [2] in order to work.&lt;/p&gt;

&lt;p&gt;3.) generateFeatureVector.m - This MatLab function generates a feature vector from an input binaural signal x, and a version of the signal captured after the binaural dummy head has been rotated by either +90&amp;deg; or -90&amp;deg; degree (variables xPos90 and xNeg90 respectively). If the sampling frequency (Fs) isn&amp;#39;t 44100, the signals are resampled to be at 44100. This file also contains a function &amp;#39;gaussianNormalisationTestData&amp;#39; which gaussian normalises the data using the mean and standard deviation calculated from the data used to train the neural networks - the mean and standard deviation values are stored in the folder GMParams in the pos90 and neg90 folders.&lt;/p&gt;

&lt;p&gt;4.) generateTestData.m - This&amp;nbsp;MatLab function analyses the included binaural dataset, it takes the input variables: head - the binaural dummy head used for the measurements either &amp;#39;KEMAR&amp;#39; or &amp;#39;KU100&amp;#39;, speaker - the speaker used for the measurements either &amp;#39;EquatorD5&amp;#39; or &amp;#39;Genelec8030&amp;#39;, and signalType - the type of signal being analysed either &amp;#39;directSound&amp;#39; or &amp;#39;reflection&amp;#39;.&lt;/p&gt;

&lt;p&gt;Text files:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
1.) noLayers.txt - a text file containing the number of layers used when training the neural network - with the current version of the code the neural network contains only 1 layer.&lt;/p&gt;

&lt;p&gt;Audio files:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
This repository contains 1152 binaural signals half of which are direct sounds segmented from a binaural room impulse responses and the other half are reflections segmented from binaural room impulse responses (detailed in the paper this material supports) the direct sounds are recorded at angles from 0&amp;deg; to 357.5&amp;deg; in steps of 2.5&amp;deg; and the reflections are recorded at angles of 1&amp;deg; to 358.5&amp;deg; in steps of 2.5&amp;deg;. In the paper only recordings relating to signals recorded with the Equator D5 are analysed.&lt;/p&gt;

&lt;p&gt;The combination of audio files include:&lt;/p&gt;

&lt;p&gt;1.) 144 direct sound recordings captured with the KEMAR 45BC binaural dummy head microphone and the Equator D5 speaker&lt;br&gt;
2.) 144 reflection recordings captured with the KEMAR 45BC binaural dummy head microphone and the Equator D5 speaker&lt;br&gt;
3.) 144 direct sound recordings captured with the KU100 binaural dummy head microphone and the Equator D5 speaker&lt;br&gt;
4.) 144 reflection recordings captured with the KU100 binaural dummy head microphone and the Equator D5 speaker&lt;br&gt;
5.) 144 direct sound recordings captured with the KEMAR 45BC binaural dummy head microphone and the Genelec 8030 speaker&lt;br&gt;
6.) 144 reflection recordings captured with the KEMAR 45BC binaural dummy head microphone and the Genelec 8030 speaker&lt;br&gt;
7.) 144 direct sound recordings captured with the KU100 binaural dummy head microphone and the Genelec 8030 speaker&lt;br&gt;
8.) 144 reflection recordings captured with the KU100 binaural dummy head microphone and the Genelec 8030 speaker&lt;/p&gt;

&lt;p&gt;The files are stored using the following file naming convention:&lt;br&gt;
head_Test3_speaker_signalType_000_0_Degrees.wav - where _000_0 defines the azimuth direction of arrival so for example for a direct sound measured with the KEMAR unit and the Genelec8030 at 5 degrees would be &amp;#39;KEMAR_Test3_Genelec8030_directSound_005_0Degrees.wav&amp;#39; and for a reflection measured with the KU100 and the Equator D5 at 298.5 degrees would be &amp;#39;KU100_Test3_EquatorD5_reflection_298_5Degrees.wav&amp;#39;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Bibliography:&lt;br&gt;
[1]&amp;nbsp;Slaney, M. (1998). Auditory Toolbox. Palo Alto, CA. [Online]. Available: https://engineering.purdue.edu/~malcolm/interval/1998-010/ [Accessed: Oct. 27, 2017]&lt;/p&gt;

&lt;p&gt;[2]&amp;nbsp;Gao, B. (2014). Cochleagram and IS-NMF2D for Blind Source Separation. [Online] Available:&amp;nbsp;http://uk.mathworks.com/matlabcentral/fileexchange/48622-cochleagram-and-is-nmf2d-for-blind-source-separation?focused=3855900&amp;amp;tab=function&amp;nbsp;[Accessed: Oct. 27, 2017]&lt;/p&gt;

&lt;p&gt;[3]&amp;nbsp;NumFocus. (n.d.). NumPy. [Online]. Available: http://www.numpy.org/ [Accessed: Oct. 27, 2017]&lt;/p&gt;

&lt;p&gt;[4]&amp;nbsp;SciPy. (n.d.). SciPy. [Online]. Available:&amp;nbsp;https://www.scipy.org/&amp;nbsp;[Accessed: Oct. 27, 2017]&lt;/p&gt;

&lt;p&gt;[5]&amp;nbsp;Google. (n.d.). TensorFlow. [Online] Available:&amp;nbsp;https://www.tensorflow.org/&amp;nbsp;[Accessed: Oct. 27, 2017]&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;All code and audio produced by: Michael Lovedee-Turner, PhD candidate in Music Technology at the Audio Lab, Department of Electronic Engineering, University of York&lt;/p&gt;

&lt;p&gt;Contact: mjlt500@york.ac.uk&lt;/p&gt;</description>
<description descriptionType="Other">Funding was provided by a UK Engineering and Physical Sciences Research Council (EPSRC) Doctoral Training Award, the Department of Electronic Engineering at the University of York.</description>
</descriptions>
</resource>
`
427
12
views