TTS icon indicating copy to clipboard operation
TTS copied to clipboard

Introducing CLI revamp [WIP]

Open p0p4k opened this issue 2 years ago β€’ 7 comments

I found TTS command line interface to be slightly un-intuitive ; be it typing complete model names OR re-loading models for every "--text" run even on the same model. On top of it, typing --"parameter" "value" seems so outdated. So, just to spice some things up, introducing a better and modern CLI.

image image

  • It is a WIP.

  • Based on python-inquirer package.

  • My plan is to add all the features from existing CLI (with the help of synthesize.py).

  • Supports holding the loaded model in memory to avoid re-loading it again unless "tts restarted". image

  • Supports changing speaker_idx and other multi-speaker params for the same loaded model without re-loading it.

  • Added tqdm progress bar for model downloads based on feature request #1530 . image

  • Added model info support image

  • Gonna update the description as I add more features.

  • Please comment if you have any new features in your mind.

Known bugs :

  • arrow keys do not work for windows. current fix: Use num-pad arrow keys instead (num lock OFF). proper fix:The python-inquirer repo has a PR for windows fix, waiting for merge.

p0p4k avatar Jun 23 '22 16:06 p0p4k

On side note, I have tested below config on python=3.10, pytorch=1.11, torchaudio=0.11.0 and works well with no errors. Due to recent bump in numpy errors while installing TTS, I believe we need to rectify this ASAP. I might need some help with testing this configuration. Thanks.

# core deps
numpy==1.21.6;python_version<"3.10"
numpy==1.22.4;python_version=="3.10"
numba==0.55.1;python_version<"3.10"
numba==0.55.2;python_version=="3.10"
#deps for CLI
inquirer

p0p4k avatar Jun 24 '22 03:06 p0p4k

FYI: The readchar libary that handles the userinput for python-inquirer is currently broken on both windows and Unix. I recomend pinning it to readchar!=3.0.5, that way at least the unix side should work and it gets updated once the author gets back to me..

I also moved the development to a fresh PR, spliting it into https://github.com/magmax/python-readchar/pull/76 and https://github.com/magmax/python-readchar/pull/79

Cube707 avatar Jul 05 '22 10:07 Cube707

another FYI: I am now a colaborator on readchar and was able to merge the fixes. Since the new v3.0.6 the arrow keys should be properly supported on windows.

Also a new Version v4.0.0 is currently in pre-releaes. It change quites a bit about the libary so maybe consier it in your development (or even give feedback if you find bugs in it..)

Cube707 avatar Jul 30 '22 19:07 Cube707

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

stale[bot] avatar Aug 31 '22 06:08 stale[bot]

@p0p4k do you plan to continue this PR or should I leave it closed?

erogol avatar Sep 08 '22 07:09 erogol

I will continue it after 2 weeks. Can I reopen it later on?

p0p4k avatar Sep 08 '22 07:09 p0p4k

Sure, I reopen now... Thanks for the update

erogol avatar Sep 08 '22 07:09 erogol

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

stale[bot] avatar Oct 08 '22 08:10 stale[bot]

10/08/2022 : Closing now. Will open when I get some free time.

p0p4k avatar Oct 08 '22 08:10 p0p4k