Skip to content

Instantly share code, notes, and snippets.

@strongSoda
Created December 22, 2019 06:57
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save strongSoda/27f4caf1335e3d03accf708e1fcdcbf0 to your computer and use it in GitHub Desktop.
Save strongSoda/27f4caf1335e3d03accf708e1fcdcbf0 to your computer and use it in GitHub Desktop.
<!-- Code for tutorial: https://www.youtube.com/watch?v=4eIRrowvLRk -->
<!-- DevHoot Publication -->
<!-- Website: https://devhoot.ooo -->
<!-- Note: This code was produced by Imran Khan @DevHoot -->
<!-- If you find this useful consider subscribing to our YouTube channel and website -->
<!-- patreon Support: https://www.patreon.com/devhoot -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<!-- Input area -->
<label for="Speech Recognition">Speech Recognition</label>
<input type="text" name="" id="speechToText" placeholder="Speak Something" onclick="record()">
<!-- Below is the script for voice recognition and conversion to text-->
<script>
function record() {
var recognition = new webkitSpeechRecognition();
recognition.lang = "en-GB";
recognition.onresult = function(event) {
// console.log(event);
document.getElementById('speechToText').value = event.results[0][0].transcript;
}
recognition.start();
}
</script>
<!-- end of script -->
</body>
</html>
@harrazmasri
Copy link

thank yooouuuuu

@strongSoda
Copy link
Author

✌️

@soumik06
Copy link

Thankyou

@Ibrahim-Elsanhouri
Copy link

greate bro

@jacksonkasi5
Copy link

sir its not work please help.
mail:nammalvar888@gmail.com
rapley me.

@maldanna
Copy link

thank you :)

@maldanna
Copy link

sir its not work please help.
mail:nammalvar888@gmail.com
rapley me
once ensure your browser allowing microphone or not

@patrisha-prescriber-360

Thank you

@STCollier
Copy link

Thank you so much :D

@sudevansujit
Copy link

Thanks

@G-Kedi
Copy link

G-Kedi commented Jul 17, 2021

Just Wonderful

@RafidSadat404
Copy link

hey! this is not working with textareas? Any idea why?

@Rohith1221
Copy link

hey! this is not working with textareas? Any idea why?

It does work , recheck the textarea id

@nflnsr
Copy link

nflnsr commented Jul 8, 2022

thank youuu :)

@m-alaiady
Copy link

Well done! it works as expected :)

@macbench
Copy link

macbench commented Sep 4, 2023

Awesome dude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment