# Error using rx\_voice.py

**URL:** <https://www.ruby-forum.com/t/error-using-rx-voice-py/107756>\
**Category:** GNU Radio\
**Created:** [June 25, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/error-using-rx-voice-py/107756 "2007-06-25T23:55:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratik\_hetamsaria](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/58956e/32.png) [@pratik\_hetamsaria](https://www.ruby-forum.com/u/pratik_hetamsaria)\
**Post date:** [June 25, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/error-using-rx-voice-py/107756/1 "2007-06-25T23:55:52Z")

</div>

I am working on tx\_voice.py and rx\_voice.py and I am trying to embed a  
fixed sequence in the payload part of my packet. However, when i try to  
receive the data using rx\_voice, i get an error saying

terminate called after throwing an instance of ‘std::runtime\_error’  
what(): msg length is not a multiple of d\_itemsize  
Aborted (core dumped)

I have added only one line in make\_packet in packet\_utils.py and it  
looks like this:(just the important lines as i thought)

def make\_packet(payload, samples\_per\_symbol, bits\_per\_symbol,  
access\_code=default\_access\_code, pad\_for\_usrp=True):

```
(packed_access_code, padded) = 

```

conv\_1\_0\_string\_to\_packed\_binary\_string(access\_code)  
(packed\_preamble, ignore) =  
conv\_1\_0\_string\_to\_packed\_binary\_string(preamble)  
payload = packed\_preamble + payload  
payload\_with\_crc = gru.gen\_and\_append\_crc32(payload)  
pkt = ‘’.join((packed\_access\_code, make\_header(L),  
whiten(payload\_with\_crc), ‘\x55’))

```
if pad_for_usrp:
    pkt = pkt + (_npadding_bytes(len(pkt), samples_per_symbol, 

```

bits\_per\_symbol) \* ‘\x55’)

```
return pkt

```

Can anyone please explain how to remove this error. I want to add fixed  
sequence so that it helps in calculation of BER.

Thanks,  
Pratik Hetamsaria
