ref: bf04b53a44641f7af77d01016301a2650de76d5f
parent: db7569c3daa50c3664b70b08a9c0af3b6f0ddd49
author: David Rowe <david@rowetel.com>
date: Thu Oct 25 12:19:45 EDT 2018
Cleanup Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
--- a/dnn/README.md
+++ b/dnn/README.md
@@ -29,7 +29,7 @@
1. Now that you have your files, you can do the training with:
```
- ./train_wavenet_audio.py exc.s8 features.f32 pred.s16 pcm.s16
+ ./train_lpcnet.py exc.s8 features.f32 pred.s16 pcm.s16
```
and it will generate a wavenet*.h5 file for each iteration. If it stops with a
"Failed to allocate RNN reserve space" message try reducing the *batch\_size* variable in train_wavenet_audio.py.
@@ -36,7 +36,7 @@
1. You can synthesise speech with:
```
- ./test_wavenet_audio.py features.f32 > pcm.txt
+ ./test_lpcnet.py features.f32 > pcm.txt
```
The output file pcm.txt contains ASCII PCM samples that need to be converted to WAV for playback
--- a/dnn/train_lpcnet.py
+++ b/dnn/train_lpcnet.py
@@ -23,7 +23,7 @@
set_session(tf.Session(config=config))
-nb_epochs = 40
+nb_epochs = 120
# Try reducing batch_size if you run out of memory on your GPU
batch_size = 64
@@ -120,4 +120,4 @@
#model.load_weights('wavenet4f2_30.h5')model.compile(optimizer=Adam(0.001, amsgrad=True, decay=5e-5), loss='sparse_categorical_crossentropy', metrics=['sparse_categorical_accuracy'])
-model.fit([in_data, in_exc, features, periods], out_data, batch_size=batch_size, epochs=120, validation_split=0.0, callbacks=[checkpoint, lpcnet.Sparsify(2000, 40000, 400, 0.1)])
+model.fit([in_data, in_exc, features, periods], out_data, batch_size=batch_size, epochs=nb_epochs, validation_split=0.0, callbacks=[checkpoint, lpcnet.Sparsify(2000, 40000, 400, 0.1)])
--
⑨