FindingFive Discussion Forum
Two copies of an uploaded audio file - Printable Version

+- FindingFive Discussion Forum (
+-- Forum: Researchers (
+--- Forum: Platform Improvement (
+--- Thread: Two copies of an uploaded audio file (/showthread.php?tid=174)

Two copies of an uploaded audio file - HF2021 - 11-17-2021

Hello, I'm not sure whether this is a bug or not but I ran into a couple of interesting issues when creating and uploading audio stimuli.
The first problem: After uploading a set of audio files (.wav) using the batch option in the "Resources files" page, I created a set of corresponding stimuli using batch upload of a CSV file.  The created stimuli remained red and the audio files did not automatically get associated with the created stimuli.  I tried the reverse, first creating the stimuli using CSV batch upload, and then uploading the audio files through the resources files page and they were still not associated with each other (stimuli remained red).  I should note that the name of the stimuli and the name of the audio file are not the same, though the stimuli are populated with the correct audio file name.  For example, a stimulus with the name "emerald" and content:
  "type": "audio",
  "content": "5emerald",
  "barrier": false,
  "visible": false

Here the audio file is named "5emerald", though the stimulus name is "emerald".  Does the batch upload require that the name of the stimulus and the content be the same as the audio file (or is it sufficient for the "content" field to have the correct audio file name)?  I can of course upload each audio file individually by clicking on the stimulus name and clicking upload, and then uploading the audio file from my computer.  This brings me the the second problem:
If I batch upload the same set of stimuli twice from the resource files page, I only get one copy of each audio file (which is great).  But, if after batch uploading audio files from the "resource files" pages, I additionally upload one of the same previously uploaded audio files from the "stimuli" section (by clicking on the red stimulus button with the right name) I end up with a second copy of an audio file in the "resource file" page.  An exact copy with the same name and content (two audio files within the resource files page) and each plays fine.  This may not be a bug, but it seemed odd that I would end up with two files with the same name and content at difference locations on the resource files page. 
Just thought I'd share this experience...
Many thanks!!

RE: Two copies of an uploaded audio file - Ting - 11-17-2021

Hi - I'll ask Victoria to try replicating the second problem. In the meantime, a quick clarification in case it is relevant: audio files should have extensions, like .wav or .mp3. Your "content' field may not work because it lacks the actual extension. There's no requirement for the filename and the stimulus name to be the same.

RE: Two copies of an uploaded audio file - vnicoletta - 11-18-2021

When replicating the second problem you described, I found the same to be true. However, I realized that the name of the file in the stimuli's "content" has to match exactly how the file name is written in Resource Files (including the cases of letters) to avoid this issue. 
For example, if your audio file is named "Sample.mp3" in Resource Files, then your stimuli would have to read:
  "type": "audio",
  "content": "Sample.mp3",
  "barrier": false,
  "visible": false

This will prevent the doubling of stimuli files in your Resource Files as well as allow the stimuli to pull the file straight from there. 
Hope this helps!

RE: Two copies of an uploaded audio file - HF2021 - 11-20-2021

Thank you both very much for the clarification!