voicesauce / opensauce-python

Voice analysis software (Python port of VoiceSauce)
Apache License 2.0
53 stars 16 forks source link

Why download Praat instead of using parselmouth? #38

Closed drfeinberg closed 5 years ago

drfeinberg commented 5 years ago

In order to use praat functions, this requires the user to download praat... Why not use the PyPi package parselmouth that uses praat's backend with a python front-end? Want a hand? Let me know.

terriyu commented 5 years ago

I did not know about parselmouth. Yes, we could make that an option, but I'm not sure that installing a Python package is significantly more convenient than downloading a Praat binary. I don't know how well-maintained parselmouth is or what version of Praat they use. The authors of parselmouth themselves write that they don't have much documentation for their software yet. Praat is well maintained and regularly releases binaries for Linux, Mac, and Windows. I feel like it's important to have transparency about what version of Praat is being used, in case there are numerical inconsistencies.

We do provide the option of installing a Python front-end for REAPER through the pyreaper Python package, but that's because REAPER is not actively being worked on, so it's unlikely to change much. Also, REAPER has to be compiled (the authors don't release binaries), so I didn't want a user of OpenSauce to have to do that by themselves and providing a Python package was a good way to avoid user compilation issues.

I love Python and would love to do everything in Python if I could. I'm not trying to shoot down your idea. Just that I would need more convincing...

terriyu commented 5 years ago

The other thing is that we only use Praat to run a couple scripts. We're not calling Praat dozens of times in the main code.

drfeinberg commented 5 years ago

I totally understand any hesitation. I also understand it's a lot easier just to use scripts you've already written and integrated into the software than to rewrite everything in Python.

To address some of your other concerns... The Parselmouth documentation states that, "The version of Praat on which this version of Parselmouth is based and the release date of that Praat version are available as PRAAT_VERSION and PRAAT_VERSION_DATE, respectively.". So that is transparent.

I would not expect people to install a python library if I were distributing a software package... I would make it install automatically with setup.py If you were worried about versions, that can also be specified in setup.py, or you could include a .whl file in the installation package, as you already include Praat binaries.

You can compile your own version of Parselmouth using any version of Praat you want, so if a new version of Praat came out that you liked better, or you like an old one best, you could use that. Parselmouth uses the Praat back-end code directly, so you do not have to worry about trusting the Parselmouth algorithms.

Nevertheless, I just thought I'd bring that to your attention.