Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed scipy dependency in extractFormants
Hello to whoever is maintaining this these days. I see the rpy2 dependency has been removed, yay. However, there is no need to go all the way to scipy, as the scipy functionality the system uses is all available in numpy. For instance, `scipy.linalg.inv` is just `numpy.linalg.inv`. And Mahalanobis distance is a trivial one-line function (here done with two lines for optimization reasons). My tests (inside the new `mahalanobis.py` file) show that you get _exactly the same result_ as the master branch, for any randomly generated data. Using an IHELP wordlist, I also confirmed that my branch gives you the exact same results, and runs somewhat faster as well (probably due to not having to import scipy). So, why remove a dependency on scipy in favor of one on numpy? Well, everyone who can run scipy can run numpy (the former depends on the latter), but not the other way around. _Many_ people (OS X users in particular) experience trouble installing scipy, myself included. Also, you get faster load times this way. I had to make four other changes on this branch: * The way Praat is located on the system is incompatible with (all?) case-sensitive file system. For whatever reason, when I installed * Praat the binary is called `Praat', but the system failed to find or use it. Users could get around this using a config file, except the system currently ignores the `Praat`/`praat` distinction, merging into the latter. I changed it so case information is preserved. * Almost everything in this system was marked executable, though only `extractFormants.py` and `remeasure.py` are executable; fixed. * Binary package management is a disaster for Python on all platforms known to me. I don't think you should tell users to use it. On _all_ platforms, `pip` is the only effective option that is unlikely to ruin your system Python install. * I ran `autopep8`. PS: the readme says to send pull requests to the `dev` branch, but that branch doesn't exist.
- Loading branch information