web speech api

More
3 years 2 months ago #106180 by ddrmoscow
ddrmoscow created the topic: web speech api
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
3 years 2 months ago - 3 years 2 months ago #106182 by DenisChenu
DenisChenu replied the topic: web speech api
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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 years 2 months ago by DenisChenu.

Please Log in to join the conversation.

More
3 years 2 months ago #106183 by ddrmoscow
ddrmoscow replied the topic: web speech api
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
3 years 2 months ago #106186 by DenisChenu
DenisChenu replied the topic: web speech api
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).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: ddrmoscow

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now