Skip to content
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

Big noise in the wave start #19

Closed
candlewill opened this issue Dec 27, 2018 · 7 comments
Closed

Big noise in the wave start #19

candlewill opened this issue Dec 27, 2018 · 7 comments

Comments

@candlewill
Copy link

I trained the model on my own data-set. The generated voice is very good, except the problem of noise in the wave start.

image

The reason I think is that, the training data is a random clip from the merged voice, so there are many training data without silence start, any only few data is start with silence.

Does anyone also have this problem?

@attitudechunfeng
Copy link

I didn't met this problem before. An irrelevant question, what's the player used in the picture?

@hdmjdp
Copy link

hdmjdp commented Jan 4, 2019

@candlewill I have the same, but not only in the start, have you solved this problem?

@ohleo
Copy link

ohleo commented Jan 4, 2019

@candlewill @hdmjdp
I also have the same, synthesized by C on CPU inference.
In Python-GPU inference, there is no noise in the wave start.

LJ050-0269.zip

@hdmjdp
Copy link

hdmjdp commented Jan 7, 2019

@ohleo have you found the reason?

@bpotard
Copy link

bpotard commented Jan 9, 2019

This is a small bug with initialising the µlaw variables. They shouldn't be initialised to 0, but to 128.

--- a/src/test_lpcnet.py
+++ b/src/test_lpcnet.py
@@ -81,6 +81,8 @@ fout = open(out_file, 'wb')
 skip = order + 1
 for c in range(0, nb_frames):
     cfeat = enc.predict([features[c:c+1, :, :nb_used_features], periods[c:c+1, :, :]])
+    fexc[0,0,0] = 128 # 0 mulaw
+    iexc[0,0,0] = 128
     for fr in range(0, feature_chunk_size):
         f = c*feature_chunk_size + fr
         a = features[c, fr, nb_features-order:]
--- a/src/lpcnet.c
+++ b/src/lpcnet.c
@@ -110,6 +110,7 @@ LPCNetState *lpcnet_create()
 {
     LPCNetState *lpcnet;
     lpcnet = (LPCNetState *)calloc(sizeof(LPCNetState), 1);
+    lpcnet->last_exc = 128;
     return lpcnet;
 }

@hdmjdp
Copy link

hdmjdp commented Jan 10, 2019

@bpotard I think you are right. but why sometimes it did not have the noise in the start even that they are initialised to 0.

@candlewill
Copy link
Author

I think the problem is solved by @bpotard 's method, and it's better to be merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants