rhasspy / piper

A fast, local neural text to speech system
https://rhasspy.github.io/piper-samples/
MIT License
6.43k stars 473 forks source link

Keeping piper/model in ram so Load Time is zero btw subsequent generations #79

Closed sarranetor closed 1 year ago

sarranetor commented 1 year ago

Hi,

the Loading Time is the biggest time when i generate a new wav file with: echo "..something.." | ./piper --model en-us-ryan-medium.onnx --output_file welcome.wav

for example: Load time: 1.47913 sec Real-time factor: 0.498159 (infer=1.3071 sec, audio=2.62385 sec)

How can i avoid it? If my application is in cpp, can I link a library and a header and use piper from cpp?

Thnaks!!

trunglebka commented 1 year ago

Your second question answered the first question and the answer to second question is: They provided C++ code to infer the model. Why can't you?

synesthesiam commented 1 year ago

See: https://github.com/rhasspy/piper/blob/master/src/cpp/piper.hpp