-IMPORTANT INFO ------------------------------ Works significantly faster in TURBO MODE (shift-click the green flag) Unfortunately, this project is in its early development stages and therefore is not stable enough to be implemented into your projects. Feel free to experiment with this project and check out what's going on behind the scenes. In order to use the voice to text and text to voice features, you must first copy the code down below and open up the JavaScript Developers console (Command+Option+J on Mac, Control+Alt+J on Windows). Paste the code into the text box and hit enter, you can now close the console and use the project! -CODE ------------------------------ javascript:new(function(){var ext=this;var recognized_speech='';ext.recognize_speech=function(callback){var recognition=new webkitSpeechRecognition();recognition.onresult=function(event){if(event.results.length>0){recognized_speech=event.results[0][0].transcript;if(typeof callback=="function")callback()}};recognition.start()};ext.recognized_speech=function(){return recognized_speech};ext._shutdown=function(){};ext._getStatus=function(){if(window.webkitSpeechRecognition===undefined){return{status:1,msg:'Sorry, the browser you are using does not support voice recognition and speech. Try using Google Chrome. -Pritix'}}return{status:2,msg:'Ready'}};var descriptor={blocks:[['w','wait and recognize speech','recognize_speech'],['r','recognized speech','recognized_speech']],};ScratchExtensions.register('Speech To Text',descriptor,ext)})();new(function(){var ext=this;ext.speak_text=function(text,callback){var u=new SpeechSynthesisUtterance(text.toString());u.onend=function(event){if(typeof callback=="function")callback()};speechSynthesis.speak(u)};ext._shutdown=function(){};ext._getStatus=function(){if(window.SpeechSynthesisUtterance===undefined){return{status:1,msg:'Your browser does not support text to speech. Try using Google Chrome or Safari.'}}return{status:2,msg:'Ready'}};var descriptor={blocks:[['w','speak %s','speak_text','Hello!'],],};ScratchExtensions.register('Text to Speech',descriptor,ext)})();new(function(){var ext=this;ext._shutdown=function(){};ext._getStatus=function(){return{status:2,msg:'Ready'}};ext.trueBlock=function(){return true};var descriptor={blocks:[['b','enabled?','trueBlock'],]};ScratchExtensions.register('extension registered?',descriptor,ext)})(); -UPDATE LOG ------------------------------ *Introduced logging for debugging *0 character sensitivity (except with 'detail' type characters)! *Errors & error codes! *Added hot words scripts, however, since I can't reset the rs variable, it will only work once (which is useless) -FUTURE UPDATE POSSIBILITIES ------------------------------ *Getting to know users *Using machine learning to learn synonymous inputs and outputs (for greater, more natural, variation in conversations *Eliminate the long wait time for input processing when turbo mode isn't enabled *Action Scripting (INCREDIBLY long script... I'll see if a future Scratch update can fix that though) -CREDITS ------------------------------ *All scripting (unless otherwise noted) by me *Graphics (unless otherwise noted) by me *Animations by me *Feedback SFX from Apple *Background from Google's Sign-In webpage *Speech to text engine by cardoch2002 ( *Text to speech engine by Google_Network ( *Pen text engine by -Rex- ( -Thank you for helping make this project work!