Tagged: record warning message
November 17, 2020 at 6:20 pm #6359cpk47Participant
I apologize for what I am sure is a stupid question, but I am having issues with setting up InitiateRecorder to record audio. I am unfamiliar with the process of setting up a server as is needed, but I thought I had figured it out and yet it still will not work.
In the documentation, it says “You need to have access to a server where you can upload and execute a PHP file, and which will authorize the PHP file to upload ZIP files to a subfolder. Free web hosting services such as Dropbox or Google drive typically do NOT offer that option. Web hosting solutions that you access via FTP/SSH (e.g., Dreamhost) would typically do the job.” I am trying to set the server through Box, which you can access using FTP (https://support.box.com/hc/en-us/articles/360043697414-Using-Box-with-FTP-or-FTPS). So, I followed the instructions provided by Box using a program called FileZilla to access my Box account, but I do not know how to get a link to the PHP file. I can right-click the file in FileZilla and “Copy URL” but this gives me something beginning in “ftpes” not “https”. I tried this URL anyway but it gives me an error saying “MediaRecorder’s save URL is incorrect”. Is it possible to even use Box as a server for what I am trying to do? I have a colleague who has offered me his Dreamhost server for me to use, but I would prefer to use my personal premium Box account if I can. Is it more obvious how to get Dreamhost to work?
I apologize if this a little off-topic since it involves several outside programs, but I have no idea where else to ask this question. I really appreciate any help. Thanks.November 17, 2020 at 6:43 pm #6360
Unfortunately I don’t think Box supports PHP at the moment. It may be possible to use another API to handle the upload request that’s sent by PennController, but I never got around to trying that out because I only have access to Box through a university account, and administrators won’t grant access to the API for security reasons. If you are also using Box via an institution, I encourage you to inquire about it before spending too much time and energy on this. I can see why you’d rather not add another third party in the loop for data collection, but I have to say that using Dreamhost would definitely be much easier
Let me know which route you end up deciding to go, I would be happy to provide assistance either way
JeremyNovember 2, 2022 at 4:25 pm #9676
Hi, Jeremy. This may be a very silly question, but still. Based on Pcibex’s documentation and the discussions here on the forum, there’s no way of hosting an experiment that records audio for free, right? We must have access to an external paid “driver” to host those files, right? There’s not free-server for that, right? A follow-up question is if the paid verson of Google Drive would do the job?November 3, 2022 at 5:28 pm #9679
Amazon offers an “AWS Free Tier” plan which gives you free access to S3 and Lambda for 12 months. The PCIbex documentation has a page that describes how to send recordings to S3
However, as you’ve probably noticed, the farm is suffering serious problems these days, so it’s unfortunately not the best time to set up a project on it
JeremyNovember 4, 2022 at 7:28 am #9683
Thank you, Jeremy!
12 months would be all right, that’s good news. I was afraid I’d have to buy a storage service! Another option would be to physically download each record locally on participants’ computer after the experiment, right? I’ve ran the pre-set projet and saw this option.
Concerning Farm’s problems, yes, I’ve noticed them. I hope everything turns out fine soon 🙏🙏🙏 thanks for the notice as well 🙂May 9, 2023 at 10:08 am #10531May 9, 2023 at 10:24 am #10533
No, no version of Google Drive, or any other such out-of-the-box cloud storage option for the matter, will work. The destination platform needs to be able to accept (cross-origin) POST requests, which requires configuration options that only some services make available (eg. AWS or webservers with Apache + PHP, among others)
EDIT: note that I am talking about Google Drive here, which is distinct from Cloud Storage (similar to AWS S3)
JeremyMay 9, 2023 at 4:02 pm #10543
All right, got it! Many thanks! @Jeremy, How would it be possible to physically download each record locally on participants’ computer after the experiment? I’m planning to run my experiment locally, so maybe I won’t even have to send data to a database. 🙂 Hence, can I store the audios directly on my computer? If so, how?
May 10, 2023 at 6:36 am #10547
- This reply was modified 6 months, 3 weeks ago by Larissa_Cury. Reason: add tag
The experiment will automatically invite the participant to download an archive containing the recordings if upload fails. You can also use
DownloadRecordingButtonto manually insert a link in a trial of your own, but make sure to do so after the results have been sent to the server
JeremyMay 10, 2023 at 7:07 am #10549
Hi, Jeremy! That’s great, thank you! I’m sorry, why would this link be used for? I mean, what is the advantage of inserting a link in the button?May 10, 2023 at 7:37 am #10550
My bad, I shouldn’t have used the word “link”.
DownloadRecordingButtonreturns a string of HTML code that represents a
BUTTONHTML element, but that string needs to be parse to effectively add a
BUTTONelement to the page, which is why you need to pass it to
newTextfor example. So you wouldn’t be inserting a link in a button, you would be inserting a
BUTTONHTML element inside a Text PennController element, so the button can be added to the page for the participant to click, and download the archive containing the recordings
JeremyMay 10, 2023 at 2:29 pm #10554
Ohhh, all right! Thank you! I’m trying to change the default text of the failure message, but it isn’t chaning…is there anything I could do? I can change the message on the button trial, but even if I change the message before it, it doens’t appear different in the experiment:
newTrial( newFunction("check upload", ()=>PennController.uploadRecordingsError) .test.is() .success( newText("confirmation", "The recordings were sent to the server. ") .print() ) .failure( newText("error", "Click on the link below to store data 👇") //////////////////////// HERE -> it doens't change! .color("red") .print() ) // , // newText("download", DownloadRecordingButton("Click here to download an archive of your recordings.") ) // .print() // , // newTimer("inifinite", 0) // .wait() )May 10, 2023 at 2:45 pm #10558
Oh! @Jeremy , I’m going to get participant’s consent before the experiment, so how can I hide the consent audio page? (they will have already consented)May 11, 2023 at 3:10 am #10561
You cannot change the error message, as it is hard-coded in the MediaRecorder element. What you are doing is create a new trial, and printing a Text element in that trial depending on whether the upload succeeded or failed (note that the trial needs to come after the upload attempt for
uploadRecordingsErrorto be set)
You can change/set the consent text in the
InitiateRecordercommand, but you cannot omit that trial, because it is when the browser requests access to the recording device: without it it would simply be impossible to record anything
JeremyMay 11, 2023 at 7:30 am #10562
Hi, @Jeremy! Thanks ! See, I could change the message, but is it impossible to change the links’s message as well? I cannot have that amount of text, my participants are learning how to read, this can bias the experiment (this is a reading experiment and there will be a version in portuguese as well). Is there a way to change the link’s message too ? (or to turn it into a button, maybe) ?
I’m refering to this msg: *By clicking this link I understand that I grant this experiment’s script access to my recording device for the purpose of uploading recordings to the server designated by the experimenter(s).*
// 👉 Record audio InitiateRecorder("https://myserver/uploadVoices/saveRecordings.php" , "Recording audio warning message here" ) //.label("first-trial")); // why is it here? // 👉 Experimental trial: //Template("items.csv", row => newTrial("experimental-trial", // newMediaRecorder(ELEMENT_NAME: string, ["audio"], ["video"]) newMediaRecorder("recorder", "audio") .record() , newTimer("recording", 3000) .start() // .wait() , . . .
- You must be logged in to reply to this topic.