ftyers / commonvoice-utils

Linguistic processing for Common Voice
GNU Affero General Public License v3.0
51 stars 14 forks source link

Fix covo command line in Anaconda #45

Closed zuazo closed 1 year ago

zuazo commented 1 year ago

Since #42, covo does not work anymore in my Anaconda environment (others may be affected):

$ echo hola | covo norm es
Mode es not found. Maybe try: covo help

The problem is that in some environments sys.argv[0] is something like /home/xzuazo/anaconda3/envs/stt/bin/covo in GNU/Linux.

This fixes the problem.

In the long-term, it might be better to change covo to use argparse or a similar library.

ftyers commented 1 year ago

Thanks! I'm not a huge fan of argparse. In terms of argparse, that could be a solution, but I like the git style of "talking to your command line", but yep it could work too.

HarikalarKutusu commented 1 year ago

/home/xzuazo/anaconda3/envs/stt/bin/covo

Sorry, it is my mistake to compare against only to "covo", (I'll send a patch...) Oh, this was a PR, thanks...