152334H / tortoise-tts-fast

Fast TorToiSe inference (5x or your money back!)
GNU Affero General Public License v3.0
755 stars 176 forks source link

invalid typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality'] value: 'fast' #114

Open sanane-ulan opened 1 year ago

sanane-ulan commented 1 year ago

Hello,

When I try to run from CLI, I am getting this error:

(.venv) ┌──[15:34:25]─[0]─[akcaym@fedora:/mnt/SD_Partiton/TTS/tortoise-tts-fast/scripts] └──| ./tortoise_tts.py "Hello" usage: tortoise_tts.py [-h] [-v str] [-V [str]] [-p typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality']] [-q bool] [--voicefixer bool] [-l bool] [-P bool] [-o [Path]] [-O Path] [--candidates int] [--regenerate [str]] [--skip_existing bool] [--produce_debug_state bool] [--seed [int]] [--models_dir str] [--text_split [str]] [--disable_redaction bool] [--device [str]] [--batch_size [int]] [--vocoder typing.Literal['Univnet', 'BigVGAN', 'BigVGAN_Base']] [--ar_checkpoint [str]] [--clvp_checkpoint [str]] [--diff_checkpoint [str]] [--num_autoregressive_samples [int]] [--temperature [float]] [--length_penalty [float]] [--repetition_penalty [float]] [--top_p [float]] [--max_mel_tokens [int]] [--cvvp_amount [float]] [--diffusion_iterations [int]] [--cond_free [bool]] [--cond_free_k [float]] [--diffusion_temperature [float]] [--low_vram bool] [--half bool] [--no_cache bool] [--sampler {dpm++2m,p,ddim}] [--original_tortoise bool] text

tortoise_tts.py: error: argument -p/--preset: invalid typing.Literal['ultra_fast', 'fast', 'standard', 'high_quality'] value: 'fast'

OS: Fedora Linux 37 (KDE Plasma) x86_64 CPU: Intel i7-6700HQ (8) @ 3.500GHz GPU: NVIDIA GeForce GTX 960M (4GB) Memory: 16GB

Can someone help me?

Thanks

P.S: I am not professional coder, so sorry if am asking wrong

SlyAquaGuy commented 1 year ago

Also having this issue on windows 11, regardless of input for -p.

Finder7771 commented 11 months ago

Have same issue. Do you have any updates ?

vuapo-eth commented 11 months ago

Same issue here

Protossoario commented 11 months ago

The source of the issue is the simple_parsing module having issues with handling the Literal type in Python version 3.9 specifically. See: https://github.com/lebrice/SimpleParsing/issues/259

The suggested workaround is to import the Literal type as:

from typing_extensions import Literal

I'll see if I can get a PR in. For anyone else having this issue, simply replace the import inside the tortoise_tts.py script.