LCAV / pyroomacoustics

Pyroomacoustics is a package for audio signal processing for indoor applications. It was developed as a fast prototyping platform for beamforming algorithms in indoor scenarios.
https://pyroomacoustics.readthedocs.io
MIT License
1.33k stars 417 forks source link

Speech directivity #317

Open pkendrick opened 11 months ago

pkendrick commented 11 months ago

This PR is an attempt to add frequency dependent source directivity. I have created a new class SpeechDirectivity and adds some examples and unit tests. This is my first PR for pyroomacoustics, let me know if ive missed anything or any issues. Thanks!


Thanks for sending a pull request (PR), we really appreciate that! Before hitting the submit button, we'd be really glad if you could make sure all the following points have been cleared.

Please also refer to the doc on contributing for more details. Even if you can't check all the boxes below, do not hesitate to go ahead with the PR and ask for help there.

Happy PR :smiley:

fakufaku commented 11 months ago

Hi @pkendrick , thank you so much for the PR!

I think it would be pretty nice to support such sources.

There are however a couple of roadblocks ahead

  1. I am currently integrating another pull request to add support for measured directivites #302 , I think there is significant code overlap with your own contribution. In particular, I have significantly refactored the compute_rir function. The bad news is that you will probably have to rewrite that part so that it plays nicely with your contribution. The good news is that the refactored version should be a lot simpler to understand.
  2. As part of the previous point, I have changed a little bit the concept of the Directivity object so that when requesting the gains at different angles, it will return the gains for all frequency bands, rather than having a frequency argument. The assumptions is that either the object is frequency independent, uses octave bands (same as simulation), or will return an impulse response.

I am quite advanced in integrating #302 so I don't think it should take too long before it is merged in master. Essentially, it is working and the tests are passing, but I would like to check a little bit more and possibly add extra tests and doc.

pkendrick commented 11 months ago

Thanks alot for letting me know, that all sounds pretty good. No problem, I am happy to update what to match this work when it is ready. Cheers!