# Failed to load audio from io.BytesIO object

**URL:** <https://discuss.huggingface.co/t/failed-to-load-audio-from-io-bytesio-object/27857>\
**Category:** Beginners\
**Created:** [December 15, 2022, 10:20am UTC](https://discuss.huggingface.co/t/failed-to-load-audio-from-io-bytesio-object/27857 "2022-12-15T10:20:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kristinabckr](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@Kristinabckr](https://discuss.huggingface.co/u/Kristinabckr)\
**Post date:** [December 15, 2022, 10:20am UTC](https://discuss.huggingface.co/t/failed-to-load-audio-from-io-bytesio-object/27857/1 "2022-12-15T10:20:13Z")

</div>

Hello everyone,

I want to do ASR with wav2vec 2.0 and the Common Voice German dataset.

After loading the data, I want to prepare the Wav2Vec2CTCTokenizer and feature extractor.

When I run:  
common\_voice\_train[0][“path”]

## I get the following RuntimeError:

RuntimeError Traceback (most recent call last)

in ----\> 1 common\_voice\_train[0][“path”]

* * *

## 12 frames

[/usr/local/lib/python3.8/dist-packages/torchaudio/backend/sox\_io\_backend.py](https://localhost:8080/#) in \_fail\_load\_fileobj(fileobj, \*args, \*\*kwargs) 31 32 def \_fail\_load\_fileobj(fileobj, \*args, \*\*kwargs): —\> 33 raise RuntimeError(f"Failed to load audio from {fileobj}") 34 35

RuntimeError: Failed to load audio from \<\_io.BytesIO object at 0x7effc8da2900\>

I work on a Google Colab notebook.  
These are my versions:  
GPU: A100-SXM4-40GB  
Cuda-Version: 11.2  
datasets==2.1.0  
librosa==0.8.1  
tensorflow==2.9.2  
tokenizers==0.13.2  
torch==1.13.0+cu116  
torchaudio==0.13.0+cu116  
transformers==4.24.0

Is there any problem with my versions and/or the Common Voice data?

Thank you very much in advance for helping me!

---

<div class="post-metadata">

**Author:** ![Owos](https://avatars.discourse-cdn.com/v4/letter/o/87869e/32.png) [@Owos](https://discuss.huggingface.co/u/Owos)\
**Post date:** [April 3, 2023, 10:37am UTC](https://discuss.huggingface.co/t/failed-to-load-audio-from-io-bytesio-object/27857/2 "2023-04-03T10:37:53Z")

</div>

Hi, were you able to find a solution for this ?
