search for: tgaudiodecod

Displaying 1 result from an estimated 1 matches for "tgaudiodecod".

Did you mean: tgaudiodecoder
2004 Aug 06
0
C++ wrapper for speex
...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); memcpy(buf, dec.getOutput(), decodedSamples * sizeof(short int)); Anyway, that's the basic idea. I don't think it could get much easier. :) Now, this is only raw encoding and decoding of the audio and doesn't have any...