A package for simulating the sound propagation in a road scenario
Project description
pyroadacoustics
Pyroadacoustics 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:
- Temperature
- Pressure
- Relative Humidity
- The 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 the Doppler effect, the acoustic atmospheric absorption, affecting sound propagation at high distances, and of the asphalt reflection properties.
Installation and Use
To install and use pyroadacoustics, the following python packages are required:
- numpy
- scipy
- matplotlib
You can install the package using pip:
pip install pyroadacoustics
Documentation and Examples
The 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 notebook simulator_demo.ipynb
.
Audio Demos
The directory audio_demos
contains the audio files of a set of simulations performed in a fixed scenario, with different source signals. The demos were produced with the simulator_demo.ipynb
code. The scenario is defined by the following parameters:
- Atmospheric conditions:
- Temperature T = 20° C
- Pressure P = 1 atm
- Relative Humidity H = 50 %
- Sampling frequency: Fs = 8 kHz
- Static Microphone at position: [0,0,1] m
- Sound 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 /s
- No background noise
The 3 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.
Academic Publication
If you use this package or part of this code in your own research, please cite the following paper:
S. Damiano and T. van Waterschoot. “Pyroadacoustics: a Road Acoustics Simulator Based On Variable Length Delay Lines”, in Proceedings of the 25th International Conference on Digital Audio Effects (DAFx22), Vienna, Austria, Sept. 2022.
Acknowledgements
This 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).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyroadacoustics-1.1.0.tar.gz
.
File metadata
- Download URL: pyroadacoustics-1.1.0.tar.gz
- Upload date:
- Size: 69.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7abea7300ad1e436fae1defdd66ae94b4a7302ac578eb1e5204b0186f3f5bd90 |
|
MD5 | f27c7f941ae0d4a4ea6db160bceecc07 |
|
BLAKE2b-256 | aed6b8032010eb44b7aba589fd648bc14c02f8a54f2b59eb5ec1fe3bdd4d0a9b |
File details
Details for the file pyroadacoustics-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyroadacoustics-1.1.0-py3-none-any.whl
- Upload date:
- Size: 54.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1c5a91e12611bd36c8c130196c12b60a120727ce94cdf0b334ffd5940f077e6 |
|
MD5 | 10323d2149da058c899f7d3223379044 |
|
BLAKE2b-256 | ef48435b639e354389aeaea5987c1c70c39542cee40874ee3fe43e2905859284 |