huakunyang / SummerTTS

SummerTTS 是一个基于C++的独立编译的中文和英文语音合成项目,可以本地运行不需要网络,而且没有额外的依赖,一键编译完成即可用于中文和英文的语音合成。SummerTTS is a standalone Chinese and English speech synthesis(TTS) project that has almost no dependency and could be easily used for Chinese TTS with just one key build out
405 stars 71 forks source link

性能 #4

Open lightwithshadow opened 1 year ago

lightwithshadow commented 1 year ago

使用chrono时间库

root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_big.bin out.wav ttsLoadModel cost time = 110ms new Synthesizer cost time = 68ms infer synthesizer cost time = 42259ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_medium.bin out.wav ttsLoadModel cost time = 76ms new Synthesizer cost time = 50ms infer synthesizer cost time = 18842ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_small.bin out.wav ttsLoadModel cost time = 64ms new Synthesizer cost time = 45ms infer synthesizer cost time = 9463ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_tiny.bin out.wav ttsLoadModel cost time = 66ms new Synthesizer cost time = 43ms infer synthesizer cost time = 4891ms

out.wav dur = 5744ms

huakunyang commented 1 year ago

使用chrono时间库

root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_big.bin out.wav ttsLoadModel cost time = 110ms new Synthesizer cost time = 68ms infer synthesizer cost time = 42259ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_medium.bin out.wav ttsLoadModel cost time = 76ms new Synthesizer cost time = 50ms infer synthesizer cost time = 18842ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_small.bin out.wav ttsLoadModel cost time = 64ms new Synthesizer cost time = 45ms infer synthesizer cost time = 9463ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_tiny.bin out.wav ttsLoadModel cost time = 66ms new Synthesizer cost time = 43ms infer synthesizer cost time = 4891ms

out.wav dur = 5744ms

非常感谢你提供的测试数据,我在下一个版本会较大幅度的提升合成的速度,再次表示感谢,下一个版本你可以再试一试速度。

huakunyang commented 1 year ago

使用chrono时间库

root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_big.bin out.wav ttsLoadModel cost time = 110ms new Synthesizer cost time = 68ms infer synthesizer cost time = 42259ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_medium.bin out.wav ttsLoadModel cost time = 76ms new Synthesizer cost time = 50ms infer synthesizer cost time = 18842ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_small.bin out.wav ttsLoadModel cost time = 64ms new Synthesizer cost time = 45ms infer synthesizer cost time = 9463ms root@d255e0717767:/tmp_workspace/SummerTTS-main/build# ./tts_test ../test.txt ../models/single_speaker_tiny.bin out.wav ttsLoadModel cost time = 66ms new Synthesizer cost time = 43ms infer synthesizer cost time = 4891ms

out.wav dur = 5744ms

今天更新的代码和模型中,速度已经较大幅度的提升了,欢迎试试看

lightwithshadow commented 1 year ago

Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz

root@dc16e7245331:/tmpworkspace/SummerTTS_light/build# ./tts_test ../test.txt ../models/multi_speakers.bin out.wav 今年是2023年,夏天还没有来,但很快会过去的。 ttsLoadModel cost time = 66ms new Synthesizer cost time = 50ms infer synthesizer cost time = 5367ms out.wav_10.wav generated infer synthesizer cost time = 6094ms out.wav_11.wav generated infer synthesizer cost time = 5161ms out.wav_12.wav generated infer synthesizer cost time = 5162ms out.wav_13.wav generated infer synthesizer cost time = 5865ms out.wav_14.wav generated infer synthesizer cost time = 4822ms out.wav_15.wav generated infer synthesizer cost time = 5436ms out.wav_16.wav generated infer synthesizer cost time = 6604ms out.wav_17.wav generated infer synthesizer cost time = 4411ms out.wav_18.wav generated infer synthesizer cost time = 5486ms out.wav_19.wav generated root@dc16e7245331:/tmpworkspace/SummerTTS_light/build# vim ../test/main.cpp root@dc16e7245331:/tmpworkspace/SummerTTS_light/build# ./tts_test ../test.txt ../models/single_speaker_fast.bin out.wav 今年是2023年,夏天还没有来,但很快会过去的。 ttsLoadModel cost time = 58ms new Synthesizer cost time = 43ms infer synthesizer cost time = 2133ms root@dc16e7245331:/tmpworkspace/SummerTTS_light/build#