facebookresearch / rlr-audio-propagation

Audio propagation engine - Meta Reality Labs Research.
Other
16 stars 5 forks source link

Adding various microphone configurations #14

Closed sreeharshaparuchur1 closed 1 year ago

sreeharshaparuchur1 commented 1 year ago

Hi,

As mentioned in the AUDIO.md documentation, this library supports a variety of sensor types. However, when I try to add a sensor type other than Binaural or Ambisonics, say Quad, I get the following error:

line 134, in add_acoustic_config
    audio_sensor_spec.channelLayout.type = habitat_sim.sensor.RLRAudioPropagationChannelLayoutType.Quad
AttributeError: type object 'habitat_sim._ext.habitat_sim_bindings.RLRAudioProp' has no attribute 'Quad'

I am using the process to add a sensor that is followed in this example notebook having encountered this issue a surfeit number of times.

Kindly let me know if the functionality is not supported yet and by when it will be rolled out or if I am making a mistake.

Thank you.

carlschisslerfb commented 1 year ago

The types other than Binaural, Mono, or Ambisonics have been removed because they were never implemented internally. It seems like the documentation that is in habitat-sim was not updated to reflect the changes to the API.

Refer to the python bindings of the audio sensor to see the most recent API, which indeed does not support the missing sensor types. https://github.com/facebookresearch/habitat-sim/blob/RLRAudioPropagationUpdate/src/esp/bindings/SensorBindings.cpp#L357

It's unlikely that the missing sensor types will be implemented, because they do not correspond to real-world microphone configurations. They refer to generic surround-sound formats which are not applicable in the context of realistic spatial microphones. There are 3 methods which I would recommend to produce output for an arbitrary microphone configuration: