shithub: opus

Download patch

ref: 9756feefbd3ac2e4f9d5beb7d82e3632378d10aa
parent: 495f8ea5f32a1831701a3fb1ce11f3d684ce5486
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Oct 10 12:48:51 EDT 2018

...

--- a/dnn/lpcnet.py
+++ b/dnn/lpcnet.py
@@ -10,7 +10,7 @@
 import h5py
 import sys
 
-rnn_units1=128
+rnn_units1=256
 rnn_units2=32
 pcm_bits = 8
 embed_size = 128
@@ -77,7 +77,7 @@
     rnn_in = Concatenate()([cpcm, cexc, rep(cfeat)])
     md = MDense(pcm_levels, activation='softmax')
     gru_out1, _ = rnn(rnn_in)
-    gru_out2, _ = rnn2(gru_out1)
+    gru_out2, _ = rnn2(Concatenate()([gru_out1, rep(cfeat)]))
     ulaw_prob = md(gru_out2)
     
     model = Model([pcm, exc, feat, pitch], ulaw_prob)
@@ -85,7 +85,7 @@
     
     dec_rnn_in = Concatenate()([cpcm, cexc, dec_feat])
     dec_gru_out1, state1 = rnn(dec_rnn_in, initial_state=dec_state1)
-    dec_gru_out2, state2 = rnn2(dec_gru_out1, initial_state=dec_state2)
+    dec_gru_out2, state2 = rnn2(Concatenate()([dec_gru_out1, dec_feat]), initial_state=dec_state2)
     dec_ulaw_prob = md(dec_gru_out2)
 
     decoder = Model([pcm, exc, dec_feat, dec_state1, dec_state2], [dec_ulaw_prob, state1, state2])
--- a/dnn/test_wavenet_audio.py
+++ b/dnn/test_wavenet_audio.py
@@ -59,7 +59,7 @@
 out_data = np.reshape(data, (nb_frames*pcm_chunk_size, 1))
 
 
-model.load_weights('wavenet5d0_19.h5')
+model.load_weights('wavenet5e3_60.h5')
 
 order = 16
 
--