0

No matter how I explain or change the index of my train or test data loader it still has error. I tried to make a new colab notebook and redownloading all datas from hugging face:

downloading dataset

from datasets import load_dataset, load_metric, Audio

common_voice_train = load_dataset("common_voice", "fa", split="train+validation")
common_voice_test = load_dataset("common_voice", "fa", split="test")

loading a sample audio file

import IPython.display as ipd
import numpy as np
import random

rand_int = random.randint(0, len(common_voice_train)-1)

ipd.Audio(data=common_voice_train\[rand_int\]\["audio"\]\["array"\], autoplay=True, rate=16000)

Error:

RuntimeError: Failed to load audio from /root/.cache/huggingface/datasets/downloads/extracted/3b0e0ce56990e1c035c009dd3032760da75614498aab0a4090ea91c8d4e8a843/cv-corpus-6.1-2020-12-11/fa/clips/common_voice_fa_18619323.mp3

and it is denying to show me the audio paths.

It is working with this command:

common_voice_train.data\["audio"\]\[0\]

[Output]:
<pyarrow.StringScalar: '/root/.cache/huggingface/datasets/downloads/extracted/3b0e0ce56990e1c035c009dd3032760da75614498aab0a4090ea91c8d4e8a843/cv-corpus-6.1-2020-12-11/fa/clips/common_voice_fa_19258088.mp3'>

but following not working

common_voice_train\["audio"\]\[0\]

Error:

RuntimeError: Failed to load audio from /root/.cache/huggingface/datasets/downloads/extracted/3b0e0ce56990e1c035c009dd3032760da75614498aab0a4090ea91c8d4e8a843/cv-corpus-6.1-2020-12-11/fa/clips/common_voice_fa_19258088.mp3
Azhar Khan
  • 3,829
  • 11
  • 26
  • 32

0 Answers0