-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed of LPCNet #1
Comments
Right now the Python code is much slower than real-time, but once converted to C, it should be faster than real-time on both desktops and phones. |
If you look at the current master, there's now C code that runs in real-time with just 20% CPU, i.e. around 250 times faster than the Python code. |
Yes, ind it s can work faster if organize data in memory (to prevent cache loss) arrange the data in memory (so that cache loss does not occur) and parallelize the execution of loops using, for example, OpenMP (#pragma omp parallel for) |
I have tested the C code version, the speed is about 1.15 times faster that realtime, really great performance. However, considering the mel prediction model consumption and that current version doesn't seems to support a streaming process, there's space to optimize. Looking forward to further progresses. |
What architecture and what NN model are you finding 1.15x faster than real-time? If you're on x86, you should see it run much faster, though previous models didn't have the block sparseness done properly and were slower. I recommend using master along with this model: https://jmvalin.ca/misc_stuff/lpcnet_models/lpcnet15_384_10_G16_100.h5 |
I tested on x86 arch and the model is lpcnet9_384_10_G16_120.h5. I'll try again as your recommendations. |
The new version is about 3.95 times faster than realtime. It's really quite fast. |
One more question, i've trained my own model. However, the model speed is much slower than your supported, is there something that i neglected ? thx. |
Current master should generate models that will run just as fast as the one I linked to. If your model is slow, then maybe you're using a model trained with a version older than 7df3f9c. In any case, I'd recommend training with current master. |
Thanks for your quick reply, with more training epochs(around 100~), the speed is normal. I guessed it maybe relates to the weights sparsity? |
Indeed, if you don't let it train long enough, then the weights won't be sparse. If you look at the training code, you'll see something like: |
Thanks for your answer. I think it's practical now, and i'll try a whole tts process in following experiments. Really great work. |
I've tried to use the pre model to directly predict the 55 dimension features. However, the quality is not as good as expected. Any suggestions about the predicted features ? |
Is reference wav file is avalible to test preformance of master model? Does benchmarks should be runned using Also related #56 |
For me it took 6sec to convert from feature to wav for generating a wav ( audio file ) of 20sec. ? |
It's expected. |
@jmvalin I use "./lpcnet_demo -synthesis x.lpc x.pcm" to generate wav from feature, but the speed is very slow, about 6sec to generate a 5sec wav, any suggestions about it? Thanks! |
@ZhaoZeqing with AVX enabled? |
@carlfm01 It worked! Thanks! |
how to get AVX enabled? |
If your machine supports AVX, then just adding -march=native to the CFLAGS should be enough. See README.md for more on CFLAGS |
Could I know about the speed of LPCNet?
The text was updated successfully, but these errors were encountered: