fixed bug in codec2_pitch.c that was casuing problems with interpolation/decimation on 190924a. We were training using a discrete PDF of pitch values, so pitch embedding failed when we interpolated pitch during quantisation

pull/10/head
David 2019-10-06 06:59:46 +10:30
parent d30b7b9cc1
commit 8c3b64b34e
10 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,7 @@ endif()
# grab latest NN model (or substitute your own)
set(LPCNET_ROOT http://rowetel.com/downloads/deep/)
set(LPCNET_FILE lpcnet_190924a_v1.0.tgz)
set(LPCNET_FILE lpcnet_191005_v1.0.tgz)
set(LPCNET_URL ${LPCNET_ROOT}${LPCNET_FILE})
# Work around not having the FetchContent module.

View File

@ -102,12 +102,13 @@ int codec2_pitch_est(CODEC2_PITCH *pitch, float Sn[], float *f0, float *voicing)
model.Wo = 2.0*M_PI/pitch_samples;
dft_speech(&pitch->c2const, pitch->fft_fwd_cfg, Sw, Sn, pitch->w);
two_stage_pitch_refinement(&pitch->c2const, &model, Sw);
pitch_samples = 2.0*M_PI/model.Wo;
estimate_amplitudes(&model, Sw, pitch->W, 1);
snr = est_voicing_mbe(&pitch->c2const, &model, Sw, pitch->W);
*voicing = 1.0 - 2.0/pow(10.0, snr/10.0);
if (*voicing < 0.0) *voicing = 0.0;
return (int)2*pitch_samples;
return round(2.0*pitch_samples);
}
void codec2_pitch_destroy(CODEC2_PITCH *pitch)

View File

@ -12,7 +12,7 @@ SRC2=vk5apr_recording_21_may.wav # 64s
SRC3=all_speechcat.sw # 185 minutes, wide range of speakers
SRC=train_src
DATE=190924a
DATE=191005
synth() {
./src/dump_data --test --c2pitch ~/Downloads/$1.sw $1.f32

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.