SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.86k stars 916 forks source link

TTS Piper seems to use CPU , is there an option for GPU - FEATURE REQUEST #9002

Closed Shorey-Git closed 1 week ago

Shorey-Git commented 1 week ago

HI its great software thankyou for all you have done with Subtitle Edit

When converting an .srt to TTS using Piper in Subtitle Edit, the it uses the CPU and there is no GPU option/tickbox.

I think there is a GPU -- accelerator flag when using Piper TTS in teh commandline, Could you please incorporate that use GPU option , thankyou

A second feature request is it would be good to have presets in the 'burn subs to video' layout section, eg a 1) lower 2) middle , 3) upper burn in position would be a great start , also a preset for 'burn in subs ' size/positio for vertical video would be very convenient

thankyou Shorey

niksedk commented 1 week ago

I don't see anyway to do this with these parameters:

usage: piper [options]

options:
   -h        --help              show this message and exit
   -m  FILE  --model       FILE  path to onnx model file
   -c  FILE  --config      FILE  path to model config file (default: model path + .json)
   -f  FILE  --output_file FILE  path to output WAV file ('-' for stdout)
   -d  DIR   --output_dir  DIR   path to output directory (default: cwd)
   --output_raw                  output raw audio to stdout as it becomes available
   -s  NUM   --speaker     NUM   id of speaker (default: 0)
   --noise_scale           NUM   generator noise (default: 0.667)
   --length_scale          NUM   phoneme length (default: 1.0)
   --noise_w               NUM   phoneme width noise (default: 0.8)
   --sentence_silence      NUM   seconds of silence after each sentence (default: 0.2)
   --espeak_data           DIR   path to espeak-ng data directory
   --tashkeel_model        FILE  path to libtashkeel onnx model (arabic)
   --json-input                  stdin input is lines of JSON instead of plain text
   --debug                       print DEBUG messages to the console
   -q       --quiet              disable logging

You might be able to compile it with gpu using the Python source, but that's ... too much.
CPU is also pretty fast, so I do not think this is important.


About burn-in, it's a good idea, but you can also do that by using ASSA format.