jstrait / wavefile

A Ruby gem for reading and writing sound files in Wave format (*.wav)
https://wavefilegem.com
MIT License
208 stars 24 forks source link

Bufer from bytes & mulaw #35

Closed Ammet closed 3 years ago

Ammet commented 3 years ago

Hi. I am receiving bytes for the linear16 wav file. Can I somehow format it to mulaw/8000 without creating or saving a file? And if not, is this format change possible at all?

jstrait commented 3 years ago

@Ammet Unfortunately, the WaveFile gem currently does not support mu-law format (either reading or writing).

I have personally never worked with mu-law format before, but my general understanding is that it is possible to convert PCM sample data to mu-law using the appropriate algorithm. However, you would need to do that work manually, due to the gem lacking support for this.

Ammet commented 3 years ago

Got it. Thank you