Comments (21)
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)
from lpcnet.
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:
Sparsify(2000, 40000, 400, (0.1, 0.1, 0.1))
It means start the sparsification at batch (not epoch) 2000, and continue until batch 40000, setting weights to zero every 400 batches, with all 3 GRU matrices having 10% non-zero weights.
from lpcnet.
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.
from lpcnet.
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.
from lpcnet.
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.
from lpcnet.
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
Note that you'll need to re-compute your features file since the definition has changed.
from lpcnet.
I tested on x86 arch and the model is lpcnet9_384_10_G16_120.h5. I'll try again as your recommendations.
from lpcnet.
The new version is about 3.95 times faster than realtime. It's really quite fast.
from lpcnet.
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.
from lpcnet.
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.
from lpcnet.
Thanks for your quick reply, with more training epochs(around 100~), the speed is normal. I guessed it maybe relates to the weights sparsity?
from lpcnet.
Thanks for your answer. I think it's practical now, and i'll try a whole tts process in following experiments. Really great work.
from lpcnet.
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 ?
from lpcnet.
Is reference wav file is avalible to test preformance of master model? Does benchmarks should be runned using lpcnet_demo
binary?
Also related #56
from lpcnet.
For me it took 6sec to convert from feature to wav for generating a wav ( audio file ) of 20sec. ?
it is expected or what numbers others are seeing.
from lpcnet.
For me it took 6sec to convert from feature to wav for generating a wav ( audio file ) of 20sec. ?
it is expected or what numbers others are seeing.
It's expected.
from lpcnet.
@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!
from lpcnet.
@ZhaoZeqing with AVX enabled?
from lpcnet.
@ZhaoZeqing with AVX enabled?
@carlfm01 It worked! Thanks!
from lpcnet.
@ZhaoZeqing with AVX enabled?
@carlfm01 It worked! Thanks!
how to get AVX enabled?
from lpcnet.
If your machine supports AVX, then just adding -march=native to the CFLAGS should be enough. See README.md for more on CFLAGS
from lpcnet.
Related Issues (20)
- Change of domain/sampling rate
- change model parameter does not work when rebuild lpcnet_demo? HOT 2
- Bug: MDense state restore crash with missing argument
- project version problem(tf2) HOT 4
- Heuristic doubling period trick by preprocessing pitch correlation values?
- Can't open input.pcm
- Is there a way to reduce the size of LPCNET_PACKET_SAMPLES and bits of per samples? HOT 1
- What does the "network size“ refer to on https://jmvalin.ca/demo/lpcnet/
- where is the gru_b_dense_feature defined?
- Does anyone have experience in jointly training of e2e LPCNet?
- Bitstream compatibility HOT 1
- P192 speed test in ARM A35 chip HOT 6
- "ValueError: axes don't match array" when applying --retrain flag to sample model file HOT 1
- I could get "nnet_data.*" files for the newly trained model. However after doing "make" and trying to generate signals with "lpcnet_demo", I find the reconstructions same as those ones of the pre-trained model. Any reason why this happens?
- bug
- How can it be so slow? HOT 1
- Training a new PLC model HOT 1
- Make errors HOT 8
- make error:undefined reference to `lpc_from_cepstrum' HOT 8
- How should the dataset of PLC algorithm be constructed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lpcnet.