Package: pyroadacoustics
pyroadacousticsPyroadacoustics is an open-source library that enables to simulate the sound propagation in a road scenario. The Python, entirely developed in Python, is built on a geometrical acoustics model to resemble the main acoustic phenomena that affect the sound produced by sources moving on a road, in a realistic outdoor environment.The simulated acoustic scene is defined by:One omnidirectional sound source, moving on an arbitrary trajectory with an arbitrary speed, that emits a user-defined sound signal.A static array of omnidirectional microphones, with arbitrary geometry, used to record the sound produced by the source.A static background noise with defined SNR.A set of environmental parameters that define the atmospheric conditions:TemperaturePressureRelative HumidityThe material of the road surface over which the sound source is moving. This material characterizes the acoustic properties of the ground surface used in the simulation.The simulator provides an accurate model of theDoppler effect, theacoustic atmospheric absorption, affecting sound propagation at high distances, and of theasphalt reflection properties.Installation and UseTo install and usepyroadacoustics, the following python packages are required:numpyscipymatplotlibYou can install the package using pip:pip install pyroadacousticsAs an alternative, you can download the repository to a local directory, and runpython setup.py installDocumentation and ExamplesThe documentation of all the classes and methods of the package is available in the corresponding docstring.An example of the definition of the simulation scene and of the use of the simulator is provided in the notebooksimulator_demo.ipynb.Audio DemosThe directoryaudio_demoscontains the audio files of  a set of simulations performed in a fixed scenario, with different source signals. The demos were produced with thesimulator_demo.ipynbcode. The scenario is defined by the following parameters:Atmospheric conditions:Temperature T = 20° CPressure P = 1 atmRelative Humidity H = 50 %Sampling frequency: Fs = 8 kHzStatic Microphone at position: [0,0,1] mSound source moving on a straight trajectory starting at position [3,20,1] m and ending at position [3,-20,1] m, with constant speed v = 5m /sNo background noiseThe 4 demos were run with different sound source signals:demo1: sinusoid with frequency F = 2000 Hz, without reflection from the ground (i.e. only direct sound field is simulated).demo2: sinusoid with frequency F = 2000 Hz, with direct sound field and reflection from the ground.demo3: white noise signal, with direct sound field and reflection from the ground.demo4: European ambulance siren sound, with direct sound field and reflection from the ground.Academic PublicationIf you use this package or part of this code in your own research, please cite thefollowing paper:S. Damiano and T. van Waterschoot. “Pyroadacoustics: a Road Acoustics Simulator Based On Variable Length Delay Lines”, inProceedings of the 25th International Conference on Digital Audio Effects (DAFx22), Vienna, Austria, Sept. 2022.AcknowledgementsThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 956962 (I-SPOT Project).