AI4Bharat / Indic-TTS

Text-to-Speech for languages of India
MIT License
130 stars 29 forks source link

cannot find str2bool module used in main.py #22

Open mayurkaloge opened 3 months ago

mayurkaloge commented 3 months ago

I have installed this project with python3.10 but when trying to run...I couldn't find reference to str2bool library used in main.py please help to find the reference. Thanks!

Aalisha commented 3 months ago

Hi,

You can use the below code snippet instead and it would work as expected. Thanks! :)

#from utils import  #str2bool

def str2bool(v):
    if isinstance(v, bool):
        return v
    if v.lower() in ("yes", "true", "t", "y", "1"):
        return True
    if v.lower() in ("no", "false", "f", "n", "0"):
        return False
    raise argparse.ArgumentTypeError("Boolean value expected.")