Closed Chutlhu closed 5 years ago
I am planning to automate all this later, but for now it is important to call the three following methods one after the other to get the computation of RIR right:
room.image_source_model()
room.ray_tracing()
room.compute_rir()
Let me know if that solves the issue.
Thank you, unfortunately it does not solve the issues when multiple-microphone array is used. You can try this also in one of the example you provide as room_from_stl.py. Just doing the following change:
room.add_microphone_array(
pra.MicrophoneArray(
np.array([[-6.5, 8.5, 2+0.1], [-6.5, 8.1, 2+0.1]]).T, room.fs)
)
I have this error:
Traceback (most recent call last):
File "src/room_from_stl.py", line 59, in <module>
room.compute_rir()
File "/home/ddicarlo/Documents/Code/InProgress/2019@dataset_aegean/pyroomacoustics/pyroomacoustics/room.py", line 1136, in compute_rir
n_bins = np.nonzero(self.rt_histograms[m][s][0].sum(axis=0))[0][-1] + 1
IndexError: index -1 is out of bounds for axis 0 with size 0
For now I can do a for-loop for every mic position of the mic array
Indeed. Thanks for pointing this out. I'm investigating the problem.
@Chutlhu I fixed the problem in 99a739514 . I also fixed the decay of the RIR which was not correctly set with respect to distance.
Dear developer, I am running the following script:
to load and compute the RIR of the following model of a 3D non-convex room (there is no ceiling.): MUSIS_3D_no_mics_simple.stl.zip With the following (cool) results (
room.plot(img_order=1)
): requirements.txtHowever, I am encountering the following problems:
room.compute_rir() return an error of sound sources outside the room:
UPDATE This error happens when multiple microphone are used.
the image source wrt to the floor is inside the room (it seems that the image method is running on the convex hall. Thus, if theri is a discontinuty, like the 'plinth' I am using, the floor is considered at the level of the plinth. EDIT this is actually right, my mistake. It is the right image source with respect to the plinth