[ Link to Paper ]
Author: Varun Shenoy ([email protected])
Affiliation: Dept. of Electrical Engineering, Stanford University
John Carmack on HRTFs and Sound Localization
requirements.txtcontains all the dependencies necessary to run this project. You can use conda or pip to install the exact versions of dependencies which we used from this file.- The
soundsfolder contains various sample sounds from mixkit (https://mixkit.co/free-sound-effects/). You can add any sounds you want to try here, but make sure that they are 16 bit. You can use an online converter (https://audio.online-convert.com/convert-to-wav) to change a sound's bit resolution to 16 bit. - The
hrtffolder contains the entire KEMAR HRIR dataset from MIT. Information about this dataset can be found here: https://sound.media.mit.edu/resources/KEMAR.html. - The
codefolder contains all the source files for the project.Speakers.pyhouses theBasicSpeaker,HRTFSpeaker, andAmbisonicsSpeakersclasses that are the bread and butter of this package.Soundstage.pyincludes theSoundstageclass and its various methods. Theplotmethod is particularly comprehensive.utils.pyhas several helper functions for interfacing with pydub, numpy, and the KEMAR dataset.- Take a look at the various demo files to see how this framework is used in action.
I built this project on Python 3.8.11, but it might work on earlier versions.
After cd-ing into the main folder, install the prerequisite frameworks using pip install -r requirements.txt or your desired package manager.
Then, cd into the code folder and run python3 demo-hrtf.py or any other demo file that is already there (or one that you have created)!