-
Notifications
You must be signed in to change notification settings - Fork 739
Added GSM format support to save function #1271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for the contribution. Let me talk with the original contributor first. If you would like, you can try HTK format too. It should be practically the same process. |
|
Hello @mthrok, Thank you! |
Some tests unrelated to the change had failed.
HTK format uses signed-integer encoding. [code]
Why not? There are other formats that saves samples in raw format like
This is most likely the underlying encoder discards the channel information. http://sox.sourceforge.net/soxformat.html says,
Looking at the code, this format seems to have a specific header but the sample storage is same as WAVE format. Also the source code has the link for the references. (if you are interested in) https://labrosa.ee.columbia.edu/doc/HTKBook21/node57.html Anyways, you can provide |
|
Thanks for your help, @mthrok. I hadn't noticed that the number of channels used in that test were 2 by default.
Yes, I just meant that I'd have to make some other change as well, such as the |
|
Closed this PR as the original contributor submitted another one. |
The comma is problematic as reported in meta-pytorch/captum#553
SUMMARY
Added the changes listed in #1264 towards supporting GSM format in the save function.
CAVEATS
http://sox.sourceforge.net/soxformat.html doesn't list various parameters for
gsm, so only a generic statement regarding GSM not supporting custom encodings/bit depth/compression has been added in the documentation, but I can revise it further, if required.I also made some changes in the code-structure for readability, with most of them aimed at conformance with the Google style guide for C++.
I even added curly braces to case blocks within switch statements, but I can roll back such changes, if required, as the Google style guide doesn't mandate one to do so.
I'm submitted this PR since the issue has a good first issue label, but if it's still being worked on by someone, please disregard this PR.
Thanks!