Welcome, Guest
Username: Password: Remember me

TOPIC: Record responses as audio

Record responses as audio 4 years 1 month ago #71422

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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 administrator has disabled public write access.

Record responses as audio 4 years 1 month ago #71427

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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 administrator has disabled public write access.

Record responses as audio 4 years 1 month ago #71434

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 83
  • Karma: 37
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 administrator has disabled public write access.

Record responses as audio 4 years 1 month ago #71585

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5840
  • Thank you received: 347
  • Karma: 261
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Record responses as audio 4 years 4 weeks ago #71632

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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: 4 years 4 weeks ago by audiolime.
The administrator has disabled public write access.

Record responses as audio 4 years 4 weeks ago #71663

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5410
  • Thank you received: 1154
  • Karma: 479
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Record responses as audio 4 years 4 weeks ago #71677

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5840
  • Thank you received: 347
  • Karma: 261
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Record responses as audio 4 years 3 weeks ago #71980

Would you mind sharing the code with me? I am trying to do the exact same thing without much luck.

-Thanks Bryan
The administrator has disabled public write access.

Record responses as audio 4 years 3 weeks ago #71984

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
Here, I have submitted my solution to the Bugtracker:

[url=http://http://bugs.limesurvey.org/view.php?id=5663]http://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 administrator has disabled public write access.

Record responses as audio 4 years 3 weeks ago #71986

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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 administrator has disabled public write access.

Record responses as audio 4 years 3 weeks ago #71993

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5410
  • Thank you received: 1154
  • Karma: 479
In the source of the question, add a click event handler for the Next/Submit buttons:
<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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 4 years 3 weeks ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: audiolime

Record responses as audio 4 years 1 week ago #73643

  • audiolime
  • audiolime's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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:
var url = 'path/to/audio/file.wav';

with this line:
var url = 'scripts/voice/v1_s' + {SAVEDID} + '_q' +  {QID} '.wav';
The administrator has disabled public write access.

Record responses as audio 4 years 4 days ago #73769

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5840
  • Thank you received: 347
  • Karma: 261
audiolime wrote:
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.
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Re: Record responses as audio 3 years 3 weeks ago #91328

  • Tgrskng
  • Tgrskng's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hello everyone,

I would like to use the Nanogong app in Limesurvey as well, however by just using the information posted in this thread and on the following website I cannot successfully use
the app: bugs.limesurvey.org/view.php?id=5663

Could someone help me out with some basic steps?

First of all do I need anything else besides Limesurvey and the nanogong app in order to make it work?
I downloaded nanogong.jar, but where do I get the receiver.php from?
Should I just copy the html text (attachment) into a Limesurvey question box or how exactly can I integrate the app into Limesurvey?
How can I save the audio recordings?
I am sorry to ask such basic questions but with the descriptions posted so far I don't know how to make it work.

I would appreciate your help a lot.
Last Edit: 3 years 3 weeks ago by Tgrskng.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.242 seconds