mirror of https://github.com/drowe67/LPCNet.git
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
parent
d30b7b9cc1
commit
8c3b64b34e
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
Loading…
Reference in New Issue