Closed arainflake closed 9 months ago
Sorry for the huge delay on this! This is indeed quite a bug, it takes -face
as -f ace
.
First of all, thanks for all the details. So, it's been taking a while because I've been dabating this. I've also been searching this, and I don't think I can easily fix this.
There's been quite a lot of debate about fixing or not that issue when it happened with Python's argparse
more than 10 years ago now, it resulted in a 'wont fix'
My suggestions of workarounds:
gtts-cli ' -face' -l en --output test1.mp3
gtts-cli '\-face' -l en --output test1.mp3
gtts-cli
.much appreciated for the advice. Ill go with those options.
Prerequisites
pip install --upgrade gTTS
)Current Behaviour (steps to reproduce)
Expected Behaviour
It should be expected to interpret the text as a solid block of text and not brake it into multiple arguments.
would expect the above to output an audio file saying "minus face" or "dash face"
Context
trying to use the g_tts library through the command line helper (gtts-cli), and noticed that the command line parser breaks when the inline text starts with a '-' such as "-hello" or "-face" it seems to interpret it as "-f" and "ace" as seperate arguments. if using "-hello" it sees "-h" as a proper argument, and then says "e" is not a valid option.
Environment
gtts version: 2.3.2 os is manjaro with the i3 window manager, fish and bash shell tested