mirror of https://github.com/drowe67/LPCNet.git
update ctest for mag options
parent
8095f8ca2a
commit
469a9930c3
|
@ -453,6 +453,7 @@ int main(int argc, char **argv) {
|
||||||
assert(pitch_index < 2*PITCH_MAX_PERIOD);
|
assert(pitch_index < 2*PITCH_MAX_PERIOD);
|
||||||
assert(pitch_index >= 2*PITCH_MIN_PERIOD);
|
assert(pitch_index >= 2*PITCH_MIN_PERIOD);
|
||||||
features[2*NB_BANDS] = 0.01*(pitch_index-200);
|
features[2*NB_BANDS] = 0.01*(pitch_index-200);
|
||||||
|
//fprintf(stderr, "count: %d [36] %f pitch_index: %d\n", count, features[36], pitch_index);
|
||||||
if (c2voicing_en) features[2*NB_BANDS+1] = voicing;
|
if (c2voicing_en) features[2*NB_BANDS+1] = voicing;
|
||||||
}
|
}
|
||||||
fwrite(features, sizeof(float), NB_FEATURES, ffeat);
|
fwrite(features, sizeof(float), NB_FEATURES, ffeat);
|
||||||
|
|
|
@ -163,7 +163,7 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, float *features, int
|
||||||
|
|
||||||
if (lpcnet->pitch_embedding) {
|
if (lpcnet->pitch_embedding) {
|
||||||
pitch = (int)floor(.1 + 50*features[36]+100);
|
pitch = (int)floor(.1 + 50*features[36]+100);
|
||||||
//fprintf(stderr, "pitch: %d\n", pitch);
|
//fprintf(stderr, "count: %d [36] %f pitch: %d\n", lpcnet->frame_count, features[36], pitch);
|
||||||
assert(pitch >=0); assert(pitch <= 255);
|
assert(pitch >=0); assert(pitch <= 255);
|
||||||
/* latest networks (using the codec 2 pitch estimator) are trained
|
/* latest networks (using the codec 2 pitch estimator) are trained
|
||||||
with pitch estimates between 40 and 255, but due to the pitch
|
with pitch estimates between 40 and 255, but due to the pitch
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -x
|
||||||
# test_core_nn.sh
|
# test_core_nn.sh
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ if [ ! -z $SYNTH_mag ]; then
|
||||||
../build_linux/src/dump_data --mag --test --c2pitch ../wav/c01_01.wav c01_01.f32
|
../build_linux/src/dump_data --mag --test --c2pitch ../wav/c01_01.wav c01_01.f32
|
||||||
diff c01_01_mag.f32 c01_01.f32 || { echo "ERROR in synth .f32 output! Exiting..."; exit 1; }
|
diff c01_01_mag.f32 c01_01.f32 || { echo "ERROR in synth .f32 output! Exiting..."; exit 1; }
|
||||||
echo "mag .f32 OK"
|
echo "mag .f32 OK"
|
||||||
../build_linux/src/test_lpcnet --mag -n lpcnet_190804a.f32 c01_01.f32 c01_01_out.raw
|
../build_linux/src/test_lpcnet --mag 1 -n lpcnet_190804a.f32 c01_01.f32 c01_01_out.raw
|
||||||
diff c01_01_190804a_targ.raw c01_01_out.raw || { echo "ERROR in synth .raw output! Exiting..."; exit 1; }
|
diff c01_01_190804a_targ.raw c01_01_out.raw || { echo "ERROR in synth .raw output! Exiting..."; exit 1; }
|
||||||
echo "mag .raw OK"
|
echo "mag .raw OK"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue