Displaying 1 result from an estimated 1 matches for "tgaudioencod".
Did you mean:
tgaudioencoder
2004 Aug 06
0
C++ wrapper for speex
...igh level and
easy to use. They handle all buffer allocation internally to make life
easy. Here's a simple little example that happens to use VAD:
// buf is float[] or short int[], buflen is multiple of frame size
// (there is a getFrameSize() method for both classes)
// Encode some audio
tgAudioEncoder enc(16000); // you could do 8000 instead
enc.enableVAD(1);
enc.encode(buf, buflen);
unsigned char *compressed = enc.getOutput();
int clen = enc.getOutputLen();
int speechDetected = enc.getSpeechDetected();
// Decode it
tgAudioDecoder dec(16000);
int decodedSamples = dec.decode(compressed, clen)...