# Wav2vec2-xls-r-2b-22-to-16 sample code not running

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwav2vec2-xls-r-2b-22-to-16-sample-code-not-running%2F12317%3E%5C
**Category:** Models\
**Created:** [November 26, 2021, 4:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwav2vec2-xls-r-2b-22-to-16-sample-code-not-running%2F12317 "2021-11-26T16:31:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasdaryl](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@thomasdaryl](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fthomasdaryl)%5C
**Post date:** [November 26, 2021, 4:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwav2vec2-xls-r-2b-22-to-16-sample-code-not-running%2F12317%2F1 "2021-11-26T16:31:44Z")

</div>

@patrickvonplaten  
I am currently trying to run this model - facebook/wav2vec2-xls-r-2b-22-to-16

> **[facebook/wav2vec2-xls-r-2b-22-to-16 · Hugging Face](https://huggingface.co/facebook/wav2vec2-xls-r-2b-22-to-16)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

The example code given using the pipeline is giving significantly different results compared to the api hosted on hugging face. I recorded and sent the same audio to the api through the website as well as ran the sample code on colab. The output is quite different.  
I ran the output even using the patrickvonplaten/librispeech\_asr\_dummy dataloaded and i checked the audio, the output is different from the text translation.

I tried running using the second step-by-step method too, it fails with "cannot import name ‘SpeechEncoderDecoder’ from ‘transformers’ "

Could you check what could be wrong? I can share my colab if needed.

Thanks for your help in advance.

---

<div class="post-metadata">

**Author:** ![patrickvonplaten](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/patrickvonplaten/32/2171_2.png) [@patrickvonplaten](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpatrickvonplaten)%5C
**Post date:** [March 18, 2022, 4:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwav2vec2-xls-r-2b-22-to-16-sample-code-not-running%2F12317%2F2 "2022-03-18T16:40:51Z")

</div>

> [@thomasdaryl](#):
>
> cantly different results compared to the api hosted on hugging face. I recorded and sent the same audio to the api through the website as well as ran the sample code on colab. The output is quite different.  
> I ran the output even using the patrickvonplaten/l

Hey @thomasdaryl,

Could you provide a non-working code snippet?
