Error when downloading dataset
#1
by
vivasvan100
- opened
import os
os.environ["LIBRITTS_PATH"] = "/content/LibriSpeech_TTS/"
import json
from datasets import load_dataset
from speech_collator import SpeechCollator, create_speaker2idx, create_phone2idx
dataset = load_dataset("cdminix/libritts-aligned", split="train")
# Create speaker2idx and phone2idx
speaker2idx = create_speaker2idx(dataset, unk_idx=0)
phone2idx = create_phone2idx(dataset, unk_idx=0)
# save to json
with open("speaker2idx.json", "w") as f:
json.dump(speaker2idx, f)
with open("phone2idx.json", "w") as f:
json.dump(phone2idx, f)
Running this on colab gives me this error. Any idea on whats causing this?
TypeError: AlignmentDataset.init() got an unexpected keyword argument 'n_workers'
Thank you for pointing this out, this due to an update to the alignments library that hasn't been pushed to pypi yet.
A workaround is to install alignments using
pip install git+https://github.com/MiniXC/alignments.git
I will push the update to pypi asap, thanks for noticing this!
Solved!
I re-started the kernel after installing these solved it for me
!pip install git+https://github.com/huggingface/transformers.git
!pip install datasets optimum
!pip install alignments phones nnAudio speech-collator
vivasvan100
changed discussion status to
closed