Remove the other columns with the [~datasets.Dataset.remove_columns] method: | |
minds = minds.remove_columns(["path", "transcription", "english_transcription", "lang_id"]) | |
Take a look at an example now: | |
minds["train"][0] | |
{'audio': {'array': array([ 0. , 0. , 0. , , -0.00048828, | |
-0.00024414, -0.00024414], dtype=float32), | |
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~APP_ERROR/602b9a5fbb1e6d0fbce91f52.wav', | |
'sampling_rate': 8000}, | |
'intent_class': 2} | |
There are two fields: | |
audio: a 1-dimensional array of the speech signal that must be called to load and resample the audio file. |