Check out the LimeSurvey source code on GitHub!

web speech api

More
2 years 10 months ago #106180 by ddrmoscow
Hello,
Have anybody tried to add "Web speech API" feachure to enable speech recognition for text input fields?
I've succeed only with short text type questions, here's the script:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var thisQuestion = $('#question{QID}');
$('input[type="text"]', thisQuestion).attr('x-webkit-speech','x-webkit-speech');
});

</script>

But it doesn't work for long and huge text fields, neither for comments.

Would be nice to have an option of speech input instead of typing long texts,
Cincerely,
Alex

Please Log in to join the conversation.

More
2 years 10 months ago - 2 years 10 months ago #106182 by DenisChenu
2 minute in google and :

The x-webkit-speech attribute can be used on any HTML5 input element with a type of text, number, tel, or search. Unfortunately, it’s not permitted on textarea fields. I suspect that’s to stop people using it for long dictations which could result in inaccurate results or high memory usage.


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 2 years 10 months ago by DenisChenu.

Please Log in to join the conversation.

More
2 years 10 months ago #106183 by ddrmoscow
Denis,Thank you for reply,
Yes, you're right , they could not manage this few years ago, untill i found page 14 especially where they declare textarea as well

Please Log in to join the conversation.

More
2 years 10 months ago #106186 by DenisChenu
Then:
$('input[type="text"],textarea', thisQuestion).attr('x-webkit-speech','x-webkit-speech');

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
The following user(s) said Thank You: ddrmoscow

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form