190920c in between 190215 and 190920a, not quite good enough

pull/10/head
David 2019-09-22 14:45:44 +09:30
parent 18c4f2ba33
commit 24bc72efef
4 changed files with 64 additions and 14 deletions

48
src/full_train.sh 100755
View File

@ -0,0 +1,48 @@
#!/bin/bash -x
# full_train.sh
# Script to train using full database, maerial developed to give reasonable quality
# to test sample database.
#
# usage:
# $ cd LPCNet/build_linux
# $ ../src/full_train.sh
SRC1=david_16kHz.wav # 122s
SRC2=vk5apr_recording_21_may.wav # 64s
SRC3=all_speechcat.sw # 185 minutes, wide range of speakers
SRC4=wianews-2019-01-20.s16 # 62 minutes
SRC5=soldersmoke202.sw # 76 minutes, lot of material with target voices
SRC=train_src
DATE=190920c
synth() {
./src/dump_data --test --c2pitch --c2voicing ~/Downloads/$1.sw $1.f32
./src/test_lpcnet $1.f32 "$2".raw
}
train() {
# repeat David and Peter to get 60 minutes worth, so it weights training
# for this type of speaker that we are struggling with
x=$(mktemp)
sox ~/Downloads/$SRC1 ~/Downloads/$SRC2 $x'.wav' repeat 20
ls -l $x.wav
# combine all samples, evaluation data at end of larger database of mixed speakers
sox $x.wav \
-t sw -r 16000 -c 1 ~/Downloads/$SRC4 \
-t sw -r 16000 -c 1 ~/Downloads/$SRC5 \
-t sw -r 16000 -c 1 ~/Downloads/$SRC3 \
-t sw $SRC.sw
ls -l $SRC.sw
./src/dump_data --train --c2pitch --c2voicing -z 1 $SRC.sw $SRC.f32 $SRC.pcm
../src/train_lpcnet.py $SRC.f32 $SRC.pcm lpcnet_$DATE
../src/dump_lpcnet.py lpcnet_"$DATE"_10.h5
cp nnet_data.c src
make test_lpcnet
}
train
synth c01_01 $DATE'_f'
synth mk61_01 $DATE'_m'
synth cq_16kHz $DATE'_cq_16kHz'
synth peter $DATE'_peter'

View File

@ -13,7 +13,7 @@ SRC1=david_16kHz.wav # 122s
SRC2=vk5apr_recording_21_may.wav # 64s
SRC=train_src
DATE=190920a
DATE=190920b
synth() {
./src/dump_data --test --c2pitch --c2voicing ~/Downloads/$1.sw $1.f32

View File

@ -7,34 +7,36 @@
# $ cd LPCNet/build_linux
# $ ../src/tinytrain.sh
# TODO:
# + maybe rname to a separate train script so we can repeat in future
# + test utterance of Peter and I
# + this is an unusual test of very small training database, to see if it can
# work within this
SRC1=david_16kHz.wav # 122s
SRC1=david_16kHz.wav # 122s
SRC2=vk5apr_recording_21_may.wav # 64s
SRC3=all_speechcat.sw
SRC4=wianews-2019-01-20.s16
SRC5=bob.wav
SRC=train_src
DATE=190806b
synth() {
./src/dump_data --mag --test --c2pitch --c2voicing ~/Downloads/$1.sw $1.f32
./src/dump_data --mag --test --c2pitch --c2voicing ~/Downloads/$1.sw $1.f32
./src/test_lpcnet --mag $1.f32 "$2".raw
}
train() {
sox ~/Downloads/$SRC1 ~/Downloads/$SRC2 -t sw $SRC.sw
./src/dump_data --mag --train --c2pitch --c2voicing -z 1 -n 1E6 $SRC.sw $SRC.f32 $SRC.pcm
sox ~/Downloads/$SRC1 \
-r 16000 ~/Downloads/$SRC2 \
-t sw -r 16000 ~/Downloads/$SRC3 \
-t sw -r 16000 -c 1 ~/Downloads/$SRC4 \
~/Downloads/$SRC5 \
-t sw $SRC.sw
./src/dump_data --mag --train --c2pitch --c2voicing -z 1 $SRC.sw $SRC.f32 $SRC.pcm
../src/train_lpcnet.py $SRC.f32 $SRC.pcm lpcnet_$DATE
../src/dump_lpcnet.py lpcnet_"$DATE"_10.h5
cp nnet_data.c src
make test_lpcnet
}
#train
train
#synth c01_01 $DATE'_f'
#synth mk61_01 $DATE'_m'
#synth wia $DATE'_wia'
synth bob $DATE'_bob'
synth wia $DATE'_wia'

View File

@ -46,7 +46,7 @@ config = tf.ConfigProto()
set_session(tf.Session(config=config))
nb_epochs = 10
nb_epochs = 20
# Try reducing batch_size if you run out of memory on your GPU
batch_size = 32