def __init__(self, resample=8, bw=0.5): ''' When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal. ''' gr.hier_block2.__init__(self, "cvsd_decode", gr.io_signature(1, 1, gr.sizeof_char), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature scale_factor = 32000.0 self.decim = resample dec = vocoder_swig.cvsd_decode_bs() s2f = gr.short_to_float() taps = gr.firdes.low_pass(1, 1, bw, 2*bw) decim = gr.fir_filter_fff(self.decim, taps) sink_scale = gr.multiply_const_ff(1.0/scale_factor) self.connect(self, dec, s2f, decim, sink_scale, self)
def test001_module_load (self): raw_enc = vocoder.cvsd_encode_sb() raw_dec = vocoder.cvsd_decode_bs() hb_enc = cvsd.cvsd_encode_fb() hb_dec = cvsd.cvsd_decode_bf()
def test001_module_load(self): raw_enc = vocoder.cvsd_encode_sb() raw_dec = vocoder.cvsd_decode_bs() hb_enc = cvsd.cvsd_encode_fb() hb_dec = cvsd.cvsd_decode_bf()