Speech directivity
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.
- [x] Are there docstrings ? Do they follow the numpydoc style ?
- [x] Have you run the tests by doing
nosetestsorpy.testat the root of the repo ? - [ ] Have you checked that the doc builds properly and that any new file has been added to the repo ? How to do that is covered in the documentation.
- [x] Is there a unit test for the proposed code modification ? If the PR addresses an issue, the test should make sure the issue is fixed.
- [x] Last but not least, did you document the proposed change in the CHANGELOG file ? It should go under "Unreleased".
Happy PR :smiley:
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
- 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_rirfunction. 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. - As part of the previous point, I have changed a little bit the concept of the
Directivityobject so that when requesting the gains at different angles, it will return the gains for all frequency bands, rather than having afrequencyargument. 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.
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!