R2D2FISH / glados-tts

A GLaDOS TTS, using Forward Tacotron and HiFiGAN. Inference is fast and stable, even on the CPU. A low quality vocoder model is included for mobile use. Rudimentary TTS script included. Works perfectly on Linux, partially on Maybe someone smarter than me can make a GUI.
MIT License
167 stars 89 forks source link

[Bug] Crash when given an empty message #9

Closed ThePython10110 closed 1 year ago

ThePython10110 commented 1 year ago

Entering an empty message results in the following error:

  File "...\glados.py", line 35, in <module>
    x = prepare_text(text).to('cpu')
        ^^^^^^^^^^^^^^^^^^
  File "...\utils\tools.py", line 7, in prepare_text
    if not ((text[-1] == '.') or (text[-1] == '?') or (text[-1] == '!')):
             ~~~~^^^^
IndexError: string index out of range

Should be fairly easy to fix.

R2D2FISH commented 1 year ago

Fixed