# Wav2vec2 decoding with pyctcdecode no whitespaces

**URL:** <https://discuss.huggingface.co/t/wav2vec2-decoding-with-pyctcdecode-no-whitespaces/10740>\
**Category:** Beginners\
**Created:** [October 13, 2021, 9:29am UTC](https://discuss.huggingface.co/t/wav2vec2-decoding-with-pyctcdecode-no-whitespaces/10740 "2021-10-13T09:29:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdvos](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@hdvos](https://discuss.huggingface.co/u/hdvos)\
**Post date:** [October 13, 2021, 9:29am UTC](https://discuss.huggingface.co/t/wav2vec2-decoding-with-pyctcdecode-no-whitespaces/10740/1 "2021-10-13T09:29:17Z")

</div>

I hope I can ask this question, despite it not being on the huggingface package. I am also not sure if I am asking this in the right forum. Please indicate if I am in the wrong place.

I am trying to decode the wav2vec2 logits with pyctcdecode (see: [GitHub - kensho-technologies/pyctcdecode: A fast and lightweight python-based CTC beam search decoder for speech recognition.](https://github.com/kensho-technologies/pyctcdecode)) instead of the greedy decoder of huggingface wav2vec2. The output looks great (oftentimes better than the wav2vec2 decoder), however, it sometimes misses a lot of spaces generating output looking like

- eurymembersaregoingtofocusintheirquestionsiamassuremdmthatafteryuelectionthecooperation  
where the reference text is
- juri members are going to focus in their questions i am sure madam that after your election the cooperation

Any suggestions for the root of this problem and possibly how to fix it?

My setup:

- wav2vec2 model and processor: facebook/wav2vec2-base-10k-voxpopuli-ft-e
- arpa model: voxpopuli\_en\_5gram\_lm downloaded from: [voxpopuli/README.md at main · facebookresearch/voxpopuli · GitHub](https://github.com/facebookresearch/voxpopuli/blob/main/README.md)

EDIT: since I posted this question someone mentioned me this issue which might contain the answer will start investigating now.: [Unexpected spacing with Huggingface wav2vec library · Issue #25 · kensho-technologies/pyctcdecode · GitHub](https://github.com/kensho-technologies/pyctcdecode/issues/25)
