cmusphinx / pocketsphinx

A small speech recognizer
Other
3.93k stars 717 forks source link

Fix float-to-int underflows (#199, #252) #303

Closed dhdaines closed 2 years ago

dhdaines commented 2 years ago

IIRC float to integer conversion is somewhat underspecified in IEEE754, and MIPS and other architectures do different things, leading to unpredictable (and bad) decoding results.

In any case we shouldn't be underflowing in the first place!!

This should fix that everywhere, and also clarifies some magic constants to be less magic.