Skip to content

IndexError on room.visibility when sources and microphones are not in sight #313

@gdelazzari

Description

@gdelazzari

I'm trying to simulate the following room:

pyroomaudio_room

where there is a sound source at the top and a microphone array at the bottom.

However, room.simulate() fails:

Traceback (most recent call last):
  File "/home/giacomo/Projects/Tesi magistrale/Python/SoundSearch/room_audio_test.py", line 49, in <module>
    room.simulate()
  File "/home/giacomo/.local/lib/python3.10/site-packages/pyroomacoustics/room.py", line 2418, in simulate
    self.compute_rir()
  File "/home/giacomo/.local/lib/python3.10/site-packages/pyroomacoustics/room.py", line 2290, in compute_rir
    vis = self.visibility[s][m, :].astype(np.int32)
IndexError: list index out of range

It seems there is an issue with the room.visibility array in this case where the source and the microphones are not visible.

If I instead place the source and the microphones such that they are in direct sight, everything works.

Am I doing something wrong?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions