0

I have a question on whether here is a python implementation of the Viterbi algorithm that has the functionality of Matlab's vitdec implementation.

In MATLAB the vitdec method can have a signature

vitdec(codedin,trellis,tbdepth,'trunc','soft',nsdec)

Where 'trunc' specifies truncated operating mode (in truncated operating mode, the encoder is assumed to have started at the all-zeros state. The decoder traces back from the state with the best metric. This mode incurs zero delay. This mode is appropriate when you cannot assume the encoder ended at the all-zeros state and when you do not want to preserve continuity between successive calls to this function), 'soft' sets for soft-decision decoding and nsdec sets the number of quantisation bits (in my case nsdec is 8)

Now there is a similar method in pythons commpy module called viterbi_decode however I don't see equivalents to the nsdec and 'trunc' parameters;

viterbi_decode(coded_bits, trellis, tb_depth, decoding_type='soft')

Does anyone know if python's commpy viterbi_decode will support Matlab's vitdec implementation with these parameters ? If not could the python version be modified to support the additional parameters ?

Thanks in advance for your help

Steve
  • 1
  • 2
  • Does this answer your question? [Python Implementation of Viterbi Algorithm](https://stackoverflow.com/questions/9729968/python-implementation-of-viterbi-algorithm) – M.Mavini Nov 20 '21 at 08:04
  • Thanks for the suggestion @m.mavini but it's really those two extra parameters (nsdec and trunc) in the MATLAB function that is causing me concern. The post that you identify didn't have those parameters and seem to be similar to the viterbi_decode method in commpy. Thanks. – Steve Nov 20 '21 at 14:12
  • Code needs to be put in code block – abunickabhi Nov 24 '21 at 10:12
  • Added code blocks as suggested by abunickabhi – Steve Nov 25 '21 at 12:28

0 Answers0