Open oriolromani opened 7 years ago
Hi,
when we implemented the platform we were thinking on uploading entire datasets, so the tool to create sounds in the platform is a django management command that takes as arguments a directory with the sounds and a .json file describing the exercises and sounds to be created.
The command is this one and it has to be run like python manage.py upload_data_set <parameters>
Do you happen to have an example of such a dataset ?
Hi, no I don't, the data we used is not shearable and I am no longer on the MTG. To upload sounds to the app you need to create a .json file like the following:
{
"exercise_name_1":{
"recs":[
{
"_id":"id_1_1",
"path":"relative_path_to_your_file/file_1_1.mp3"
},
{
"_id":"id_1_2",
"path":"relative_path_to_your_file/file_1_2.mp3"
}
],
"ref_media":"relative_path_to_your_file/reference_file_1.mp3",
"name":"reference_sound_exercise_1"
},
"exercise_name_2":{
"recs":[
{
"_id":"id_2_1",
"path":"relative_path_to_your_file/file_2_1.mp3"
},
{
"_id":"id_2_2",
"path":"relative_path_to_your_file/file_2_2.mp3"
}
],
"ref_media":"relative_path_to_your_file/reference_file_2.mp3",
"name":"reference_sound_exercise_2"
}
}
which describes which exercises have to be created and its sounds and reference sounds. Once you have that file you have to provide it to the 'description' parameter of the script I mentioned before.
Thanks a lot that's exactly what I needed !
Hello,
I would like to upload an mp3 custom file but can't find a way to do it properly. I tried adding various objects via the admin interface but when I reach the sound itself I can't make it work .
@oriolromani , Am I missing something ?