PennController for IBEX › Forums › Support › Last recording not saved
- This topic has 7 replies, 3 voices, and was last updated 3 years, 5 months ago by jinyoungjo.
-
AuthorPosts
-
June 25, 2021 at 2:21 am #7084jinyoungjoParticipant
Hello,
In my experiment, recordings obtained from participants’ production of test sentences are saved to my server. The experiment consists of two blocks, and it seems that in the second block, the last recording is not saved. (I should expect to see 320 saved files, but I have only 319 files per participant; it turns out that the very last audio is missing.) Only two people participated in my experiment, and it happened for both of them.
It is not clear to my why such problem arises, because I am using the same codes and same test sentences for both block 1 and 2. Here is a copy of some parts of my script (the label “experiment2” is the second block, which is followed by the “questionnaire1” in the experiment). Could you please identify the problem? Please let me know if you need further information.
Template("items_target.csv", variable => newTrial("experiment1", /*newText("begin","<p>아무 키나 누르시면 시작합니다.") .center() .settings.css("font-size","20px") .print() , newKey("").wait(), getText("begin").remove(),*/ newAudio(variable.audio).center().print() , newText("\n") .settings.css("font-size","30px") .center() .print() , newText("test_sentence",variable.sentence) .settings.css("font-size","30px") .center() .print() , newText("\n") .settings.css("font-size","30px") .center() .print() , newButton("Start recording").center().print().wait() , /*newTimer("ISI",500) .start() .wait() ,*/ newText("recording", "Recording...") .settings.css("font-size","50px") .settings.css("color","red") , newMediaRecorder("record","audio") .record() .log() , newKey("") .callback(newTimer("buffer",500).start().wait(),getTimer("recording").stop()) , newText("\n").print() , newButton("Stop recording").center().print().wait() , getMediaRecorder("record") .stop() , newText("\n").print() , newButton("Next").center().print().wait() , getText("test_sentence") .remove() ) .log("type",variable.type) .log("finalC",variable.finalC) .log("ID", getVar("ID")) .log("noun",variable.noun_roman) .log("suffix",variable.suffix_roman) ); Template("items_target.csv", variable => newTrial("experiment2", /*newText("begin","<p>아무 키나 누르시면 시작합니다.") .center() .settings.css("font-size","20px") .print() , newKey("").wait(), getText("begin").remove() ,*/ newAudio(variable.audio).center().print() , newText("\n") .settings.css("font-size","30px") .center() .print() , newText("test_sentence",variable.sentence) .settings.css("font-size","30px") .center() .print() , newText("\n") .settings.css("font-size","30px") .center() .print() , newButton("Start recording").center().print().wait() , /*newTimer("ISI",500) .start() .wait() ,*/ newText("recording", "Recording...") .settings.css("font-size","50px") .settings.css("color","red") , newMediaRecorder("record","audio") .record() .log() , newKey("") .callback(newTimer("buffer",500).start().wait(),getTimer("recording").stop()) , newText("\n").print() , newButton("Stop recording").center().print().wait() , getMediaRecorder("record") .stop() , newText("\n").print() , newButton("Next").center().print().wait() , getText("test_sentence") .remove() ) .log("type",variable.type) .log("finalC",variable.finalC) .log("ID", getVar("ID")) .log("noun",variable.noun_roman) .log("suffix",variable.suffix_roman) ); newTrial("questionnaire2", newText("purpose", "<p>이 실험의 목적이 무엇이라고 생각하시나요?") .settings.css("font-size", "20") .print(), newTextInput("ExpPurpose").print().log(), newText("\n").print(), newButton("Next").center().print().wait() ); newTrial("questionnaire1", newText("Q0_age", "<p>1. 귀하의 나이를 만으로 적어주세요.") .settings.css("font-size", "20") .print() , newTextInput("Q0 Age").print() .before(newText("만 ").print()) .after(newText(" 세").print()) .print() .log() , newText("Q0_gender", "<p>2. 귀하의 성별은 무엇입니까?") .settings.css("font-size", "20") .print() , newTextInput("Q0 Age").print() .print() .log() ,
(and so on…)
Thank you very much for your help.
June 25, 2021 at 6:58 pm #7086amilamParticipantHello,
Have you tried using the Sequence command for initiating the order of your trials?
June 25, 2021 at 9:16 pm #7088jinyoungjoParticipantYes, my sequence command looks like this:
Sequence("welcome", "init", "soundtest", "instruction", "instruction2", sepWith("sendAsync",randomize("practice")), "instruction3", sepWith("sendAsync",randomize("experiment1")), "break", sepWith("sendAsync",randomize("experiment2")), "questionnaire1", "questionnaire2", "familiarity", SendResults(), "send")
I tried switching
sepWith("sendAsync",randomize("experiment1"))
andsepWith("sendAsync",randomize("experiment2"))
, and this time, the recording in the final trial of “experiment1” is not saved.June 26, 2021 at 8:03 pm #7089amilamParticipantWhat about adding the “break” right after both
sepWith("sendAsync",randomize("experiment1"))
andsepWith("sendAsync",randomize("experiment2"))
?June 27, 2021 at 11:45 am #7090jinyoungjoParticipantThat doesn’t work either, and I don’t really see a reason why it should work… Thank you for the suggestion, though!!
June 27, 2021 at 12:07 pm #7092JeremyKeymasterHi,
What version of PennController are you using? If you’re not using it already, I suggest you upgrade to 2.0.beta where I improved the uploading system
In any case, you should probably add a non-async
UploadRecordings
trial just before theSendResults
trial, to make sure all the recordings are uploaded before finishing the experimentAlso, feel free to share your project’s URL to ease the troubleshooting process
Jeremy
June 27, 2021 at 3:07 pm #7093jinyoungjoParticipantHi Jeremy,
Thank you very much for your reply!
I thought my experiment was too long, so didn’t post a demo link. I have made a simplified version of it: https://farm.pcibex.net/r/MSSnpS/
Could you please let me know how I could make the synchronous UploadRecordings? I’ve been searching the tutorial and the forum but haven’t found an example… could you please direct me to relevant resources or kindly teach me how to change the codes?
Thank you.
June 27, 2021 at 6:56 pm #7094jinyoungjoParticipantHello again,
Adding UploadRecordings just before SendResults made it work! Now all the files are saved. Thank you so much!
-
AuthorPosts
- You must be logged in to reply to this topic.