Web Speech APIを使いたいと思う
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"> </head> <body> <h1 class="text-center h1">Web Speech API</h1> <div id="content"> <input type="textarea" id="q" name="q" size=60> <input type="button" value="Click to Speak" onclick="recognition.start()"> </div> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script> <script> let recognition = new webkitSpeechRecognition(); recognition.onresult = function(event) { if (event.results.length > 0){ q.value = event.results[0][0].transcript; } } </script> </body> </html>
なんやこれは、、、 ここもコモディティ化されとんのか。。。