Record responses as audio

More
5 years 2 months ago - 5 years 2 months ago #71993 by tpartner
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.
Last Edit: 5 years 2 months ago by tpartner.
The following user(s) said Thank You: audiolime

Please Log in to join the conversation.

More
5 years 1 month ago #73643 by audiolime
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';

Please Log in to join the conversation.

More
5 years 1 month ago #73769 by Mazi

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)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #91328 by Tgrskng
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: 4 years 2 months ago by Tgrskng.

Please Log in to join the conversation.