Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Record responses as audio

  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #71422 by audiolime
Record responses as audio was created by audiolime
Hi,

I am planning to conduct a study on difficult sentence processing and we are interested in how participants read out a number of sentences aloud.

Now as we want to conduct the study online, the sentences would be administered in written form but participants responses would have to be recorded as audio files.

I know there are plugins to play audio files in limesurvey but i haven't found anything on actually recording audio-responses.

Could you help me out here, any help would be great!

Best,
audiolime
The topic has been locked.
  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #71427 by audiolime
Replied by audiolime on topic Record responses as audio
Hi all,

I found an applet that does exactly what I need: Nanogong . Is there any way to implement this into limesurvey?
Any hints or advice is greatly appreciated!
Esther
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71434 by TMSWhite
Replied by TMSWhite on topic Record responses as audio
Esther-

If you have (or have access to) the PHP skills (or can make a suitable donation to LimeSurvey and find a developer who has bandwidth), adding Nanogong shouldn't be too hard. You would probably want to store a binary file, so you'd need a BLOB datatype, and none of the existing question types use that. So, you'd need to create a new question type to store the BLOB. I had to create the Equation question type a few months back, and it only took a few day's effort.

However, a lot depends on your timing. We're nearly ready to release version 1.92, which (knock on wood) will be the last in the 1.xx series. We're also nearing release of 2.0 alpha, which uses an entirely new framework. So, if you need something soon, you'd need to use the 1.xx approach, but it would need to be ported to 2.x. If you can wait about 3 months, it might be possible to build it directly into the 2.0 branch.

/Tom
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71585 by Mazi
Replied by Mazi on topic Record responses as audio
The easy way would be to link to their demo page at gong.ust.hk/nanogong/nanogong42.html from within the survey, telling them to record the voice and store the file locally. Then use a file upload question type at Limesurvey and let them upload their file.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago - 12 years 2 months ago #71632 by audiolime
Replied by audiolime on topic Record responses as audio
Thank you to both of you for your time and consideration! I finally managed to integrate the applet into a text-only style question.

The Nanogong setup was explained very well on their website, the only thing that was a little bit difficult was to get the path right so that limesurvey could find the applet. I did this with "codebase", if anybody else wants to try it I can send you the code I used.

The next step will be to edit the name of the audio file the applet generates, I somehow need to pass on the value of limesurvey's {savedid} to the php script nanogong uses, if you have any ideas I would be very thankful: See my new post

Best regards,
Esther
Last edit: 12 years 2 months ago by audiolime.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71663 by tpartner
Replied by tpartner on topic Record responses as audio

I somehow need to pass on the value of limesurvey's {savedid} to the php script nanogong uses...

Answered - www.limesurvey.org/en/forum/can-i-do-thi...o-another-php-script

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71677 by Mazi
Replied by Mazi on topic Record responses as audio

audiolime wrote: The Nanogong setup was explained very well on their website, the only thing that was a little bit difficult was to get the path right so that limesurvey could find the applet. I did this with "codebase", if anybody else wants to try it I can send you the code I used.

Please open a ticket at our bugtracker at the "user patches" section and attach your code files there. The forum is cleaned up regularly so this might get lost if you post it here.

When you are done, please post the link to the bugtracker ticket here.
Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
12 years 2 months ago #71980 by lime4nonprofit
Replied by lime4nonprofit on topic Record responses as audio
Would you mind sharing the code with me? I am trying to do the exact same thing without much luck.

-Thanks Bryan
The topic has been locked.
  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #71984 by audiolime
Replied by audiolime on topic Record responses as audio
Here, I have submitted my solution to the bugtracker:

[url=http://http://bugs.limesurvey.org/view.php?id=5663] bugs.limesurvey.org/view.php?id=5663 [/url]

The two code files you need are attached to the question, receiver.php and the nanogong question code that you copy into your limesurveys question source code field. If you still have problems, let me know!
The topic has been locked.
  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #71986 by audiolime
Replied by audiolime on topic Record responses as audio
Hi all,

I have a further question concerning this issue - I would like to modify the "next" button in the survey for the questions that require an audio recording. Everytime a participant clicks on "next", the script should check if a file with a specific name exists in a specific folder.

I wonder where I could make these changes to the next button, is that something for the question template? I think that once I figure out where to change the code the actual 'check-if-file-exists' will be pretty easy, I just don't know where to start.

I would be very thankful for some tips!
Best,
Esther
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago - 12 years 2 months ago #71993 by tpartner
Replied by tpartner on topic Record responses as audio
In the source of the question, add a click event handler for the Next/Submit buttons:
Code:
<script type="text/javascript" charset="utf-8">
 
 
  $(document).ready(function() {
 
    // Interrupt next/submit function 
    $('#movenextbtn, #movesubmitbtn').click(function(){
 
      var url = 'path/to/audio/file.wav';
 
      // Request the file
      var request = new XMLHttpRequest();
      request.open('HEAD', url, false);
      request.send();
 
      // Act on the request results
      if(request.status!=404 == false) {
        // File doesn't exist
        alert ('File does not exist!');
        return false
      }
      else {
        // File exists
        return true
      }
    });
  });
 
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 12 years 2 months ago by tpartner.
The following user(s) said Thank You: audiolime
The topic has been locked.
  • audiolime
  • audiolime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 1 month ago #73643 by audiolime
Replied by audiolime on topic Record responses as audio
wow, that's great! I just came back to this issue after working on other parts on the project, and it works beautifully! Thank you very much for the code.

I tried to adapt it to check for a file name that includes {SAVEDID} and {QID} (I am using 1.92 now), but somehow that code never generates the "File does not exist"- error.
I substituted the line:
Code:
var url = 'path/to/audio/file.wav';

with this line:
Code:
var url = 'scripts/voice/v1_s' + {SAVEDID} + '_q' +  {QID} '.wav';
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose