File size: 336 Bytes
3efa218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from datasets import load_dataset, Audio

dataset = load_dataset('json', data_files="train.jsonl")
print(dataset)

dataset_audio = dataset.cast_column(
    "audio", Audio(sampling_rate=48_000, mono=True, decode=True)
)
print(dataset_audio)

train_set = dataset_audio['train']

train_set.to_parquet("train.parquet")

print(train_set[1])