phase_err_label = sprintf(";phase_err SNR %4.2f dB;",snr_phase);
plot((1:L)*Wo*4000/pi, 20*log10(orig-synth), phase_err_label);
- hold off;
endif
+ hold off;
+
if (file_in_path(".",phase_name))
figure(3);
plot((1:L)*Wo*4000/pi, phase(f,1:L)*180/pi, "-o;phase;");
--- /dev/null
+#!/bin/sh
+# code.sh
+# David Rowe 10 Sep 2009
+#
+# Run steps to encode a speech sample
+
+../unittest/tnlp ../raw/$1.raw ../unittest/$1_nlp.p
+../src/sinenc ../raw/$1.raw %1.mdl 300 ../unittest/$1_nlp.p
+../src/sinedec ../raw/$1.raw %1.mdl -o $1_uq.raw
+../src/sinedec ../raw/$1.raw %1.mdl --phase 0 -o $1_phase0.raw
+
--- /dev/null
+#!/bin/sh
+# listen1.sh
+# David Rowe 10 Sep 2009
+#
+# Run menu with common sample file options, headphone version
+
+../script/menu.sh ../raw/$1.raw $1_uq.raw $1_phase0.raw -d /dev/dsp1
+
+
--- /dev/null
+#!/bin/sh
+# listen1.sh
+# David Rowe 10 Sep 2009
+#
+# Run menu with common sample file options, headphone version
+
+../script/menu.sh ../raw/$1.raw $1_uq.raw $1_phase0.raw -d /dev/dsp1
+
+
#define PI 3.141592654 /* mathematical constant */
#define T 0.1 /* threshold for local minima candidate */
#define F0_MAX 500
-#define CNLP 0.5 /* post processor constant */
+#define CNLP 0.3 /* post processor constant */
/*---------------------------------------------------------------------------*\
/* Sample LPC model at harmonics */
+ //#define NO_LPC_PHASE
#ifdef NO_LPC_PHASE
/* useful for testing with Sn[] an impulse train */
for(m=1; m<=PHASE_LPC_ORD; m++)