[Speex-dev] Decoding multiple frames
    yenda adney 
    yendovy.konference at seznam.cz
       
    Fri Feb 26 06:00:57 PST 2010
    
    
  
Hi all,
I'm using speex through my own python wrapper based on ctypes. In my application I'm forced to process relatively large chunks of audio data (250ms). I was able to supply sufficiently large buffer to the SpeexBits structure and then  encode using (code snippet)
        _speex.speex_bits_reset(byref(self.bits))
        for i in range(0, len - self.frameSize, self.frameSize):
            _speex.speex_encode_int( ... )
        N2 = _speex.speex_bits_write( ...  )
However, when I receive the encoded chunk at the decoder side, I don't know how large the output buffer should be since the DTX and VAD is turned on. Shall I send number of encoded frames together with the speex data or is it possible to infer (from the received speex data) how large the output buffer should be? 
Best regards, Jan Trmal
    
    
More information about the Speex-dev
mailing list