{"id":13533095,"url":"https://github.com/sunits/rir_simulator_python","last_synced_at":"2026-01-02T05:12:11.904Z","repository":{"id":81726812,"uuid":"107658069","full_name":"sunits/rir_simulator_python","owner":"sunits","description":"Room impulse response simulator using python","archived":false,"fork":false,"pushed_at":"2020-06-22T08:19:32.000Z","size":738,"stargazers_count":92,"open_issues_count":1,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-02T20:32:46.960Z","etag":null,"topics":["acoustics","python","room-impulse-response","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-20T09:20:00.000Z","updated_at":"2024-09-06T03:14:29.000Z","dependencies_parsed_at":"2023-03-13T20:07:17.191Z","dependency_job_id":null,"html_url":"https://github.com/sunits/rir_simulator_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunits%2Frir_simulator_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunits%2Frir_simulator_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunits%2Frir_simulator_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunits%2Frir_simulator_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunits","download_url":"https://codeload.github.com/sunits/rir_simulator_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713217,"owners_count":20821858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acoustics","python","room-impulse-response","signal-processing"],"created_at":"2024-08-01T07:01:16.529Z","updated_at":"2026-01-02T05:12:11.829Z","avatar_url":"https://github.com/sunits.png","language":"Python","funding_links":[],"categories":["Software","Tools"],"sub_categories":["Audio data augmentation","Coming soon...","SSL+"],"readme":"# Python RIR Simulator\nRoom impulse response simulator using python\n\nCopyright 2003 Douglas R. Campbell\n\nCopyright 2008-2016 Emmanuel Vincent\n\nCopyright 2017 Sunit Sivasankaran\n\n This software is a python version of the stripped-down version of the Roomsim toolbox version 3.3 by Douglas R. Campbell.\n The matlab function for the stripped down version as well as RIR generation for moving sources can be found here:\nRoomsimove, https://www.irisa.fr/metiss/members/evincent/Roomsimove.zip\n \nIf you find the code useful, please cite the following reference:\nRoom Impulse Response Generator, https://github.com/sunits/rir_simulator_python\n\n\nOne  difference between the matlab version and this code is that \nRT60 value is assumed to be same for all frequencies.\n\nTested for sampling rate of 16000 Hz. \n\n## Usage:\n\n### Generate random Room Impulse Responses\n    import roomsimove_single\n    # Create an interface. RIRs are not yet generated\n    rir_if = roomsimove_single.RandomRIR(sampling_rate=16000)\n    # Supports multiple sources. Each source is placed in a random position inside the same room.\n    src = [np.random.rand(10000), np.random.rand(10000)] \n    # Support multiple microphones. Position of each device is also random.\n    # Minimum distance between each element (mics or sources) is 0.5 meters\n    rev_sig = rir_if.reverberate(src, mic_cnt=2)\n    # rev_sig contains a list of reverberate sources. \n    # Each element in the list is of dimension [src_len x mic_cnt]\n\n\n### As standalone file:\n    python roomsimove_single.py config_file source_pos_x source_pos_y source_pos_z output_file\n\n    The help options will also give the details\n    python roomsimove_single.py -h\n    \n### As a module:\n    using config_file\n    -----------------\n    import roomsimove_single\n    sim_rir = roomsimove_single.RoomSim.init_from_config_file(config_file)\n    source_pos = [1, 1, 1]\n    rir = sim_rir.create_rir(source_pos)\n\n    using default values of absorption coeffecients\n    -----------------------------------------------\n    import roomsimove_single\n    room_dim = [4.2, 3.4, 5.2]\n    room = roomsimove_single.Room(room_dim)\n    mic_pos = [2, 2, 2]\n    mic1 = roomsimove_single.Microphone(mic_pos, 1,  \\\n            orientation=[0.0, 0.0, 0.0], direction='omnidirectional'):\n    mic_pos = [2, 2, 1]\n    mic2 = roomsimove_single.Microphone(mic_pos, 2,  \\\n            orientation=[0.0, 0.0, 0.0], direction='cardioid'):\n    mics = [mic1, mic2]\n    sample_rate = 16000\n    sim_rir = roomsimove_single.RoomSim(sample_rate, room, mics, RT60=0.3)\n    source_pos = [1, 1, 1]\n    rir = sim_rir.create_rir(source_pos)\n\n    # Applying RIR to data\n    import fftfilt\n    import soundfile as sf\n    # Assuming single channel data\n    [data, fs] = sf.read(wav_file)\n    reverb_data = fftfilt.fftfilt(rir,data)\n\n\n\n\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunits%2Frir_simulator_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunits%2Frir_simulator_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunits%2Frir_simulator_python/lists"}