Quickstart
----------
-$ cd codec2/src
+$ ./configure
$ make
+$ cd src
$ ./c2enc ../raw/hts1a.raw hts1a_c2.bit
$ ./c2dec hts1a_c2.bit hts1a_c2.raw
$ ../script/menu.sh ../raw/hts1a.raw hts1a_c2.raw
'ossplay' programs to be installed (see http://sox.sourceforge.net/,
http://www.alsa-project.org/, or http://www.opensound.com/ respectively).
+To enable dump files build using:
+
+$ make clean
+$ CFLAGS=-DDUMP ./configure
+$ make
+
Programs
--------
raw - speech files in raw format (16 bits signed linear 8 KHz)
unittest - unit test source code
wav - speech files in wave file format
-
+ voicing - hand estimated voicing files
quantise.h \
comp.h \
dump.h \
-globals.h \
lpc.h \
nlp.h \
postfilter.h \
quantise.h \
comp.h \
dump.h \
-globals.h \
lpc.h \
nlp.h \
postfilter.h \
\*---------------------------------------------------------------------------*/
-/* Complex number */
-
-typedef struct {
- float real;
- float imag;
-} COMP;
-
/* Structure to hold model parameters for one frame */
typedef struct {
#ifndef __DUMP__
#define __DUMP__
+#include "comp.h"
+
void dump_on(char filename_prefix[]);
void dump_off();
#define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr
-void four1(data,nn,isign)
-float data[];
-int nn,isign;
+void
+four1(float * data, int nn, int isign)
{
int n,mmax,m,j,istep,i;
double wtemp,wr,wpr,wpi,wi,theta;
#ifndef __NLP__
#define __NLP__
+#include "comp.h"
+
void *nlp_create();
void nlp_destroy(void *nlp_state);
float nlp(void *nlp_state, float Sn[], int n, int m, int pmin, int pmax,
#include "defines.h"
#include "phase.h"
#include "four1.h"
+#include "comp.h"
#include <assert.h>
#include <math.h>
#ifndef __SINE__
#define __SINE__
+#include "defines.h"
+#include "comp.h"
+
void make_analysis_window(float w[], COMP W[]);
void dft_speech(COMP Sw[], float Sn[], float w[]);
void two_stage_pitch_refinement(MODEL *model, COMP Sw[]);
#include <string.h>
#include <math.h>
#include "defines.h"
+#include "comp.h"
#include "codec2.h"
#include "quantise.h"
#include "interp.h"