bshall/UniversalVocoding

mulaw encdoing

maximilianchen opened this issue · 1 comments

Hi bshall,

I have doubt about the mu-law encoding function. I wondered why the function mulaw_encode() returns np.floor((fx + 1) / 2 * mu + 0.5) instead of fx directly.

Hi @maximilianchen,

Sorry about the delay. If you look at the definition on wikipedia you'll see that the range of fx is between -1 and 1. So what we are actually doing is mu-law encoding and then quantizing the result. That's where the next step comes from. I hope that helps.