SpatialScaper
SpatialScaper copied to clipboard
Rooms as objects
Currently, details about rooms and their data structures live inside the Scaper object including some adhoc handling of directory structures. Moving this out should make it easier to implement things like virtual rooms in the API.
Changes:
-
SOFARoomclass-
SOFARoom.get_ambient_noise_pathsformerlyScaper.use_room_ambient_noise- returns a list of paths instead of sampling inside the function
- fixed minor bug which would have returned incorrect files if you were in a folder like
foa_experiments
-
SOFARoom.get_irsformerlyScaper.get_room_irs_wav_xyz- calls
SOFARoom._format_irsformerlyScaper.get_format_irs(disableformat=False)
- calls
-
SOFARoom.get_positionsformerlyScaper.get_room_irs_xyz -
SOFARoom.get_boundariesformerlyScaper._get_room_min_max
-
-
BaseRoomadded as a generic base class. May just change toRoom? -
Scaper- added
Scaper.room: SOFARoom -
rir_dir, room:str, formatare now underSOFARoom -
use_room_ambient_noise=Truemoved fromScaper.__init__toScaper.add_background- I know add_background is only intended to be run once, but I figured this would make it possible to layer ambient noise with noise generators
- added
This is just a sketch, so feel free to discuss alterations. This PR should all be structural so the audio outputs should stay exactly the same.
I have generated some test files successfully, but my FSD50K download is only partial right now (for some reason).