Hi ! Here is an example in python:
ds = Dataset.from_dict({
"audio": ["path/to/audio_1", "path/to/audio_2", ..., "path/to/audio_n"],
"transcription": ["First transcript", "Second transcript", ..., "Last transcript"],
}).cast_column("audio", Audio())
Alternatively you can also define an AudioFolder (see docs):
my_dataset/
βββ README.md
βββ metadata.csv
βββ data/
βββ audio_0.wav
...
βββ audio_n.wav
Also, if I want to have 2 separate datasets, one for test and one for training, whatβs the approach to follow? Send everything and tag in the metadata.csv or create 2 folders and upload the snippets/transcription with?
You can structure your AudioFolder like this:
my_dataset/
βββ README.md
βββ metadata.csv
βββ test/
| βββ audio_0.wav
| ...
| βββ audio_n.wav
βββ train/
βββ audio_0.wav
...
βββ audio_n.wav
Itβs also possible to have one metadata.csv
in train/
and one in test/
if you want