[SOLVED]Why is this code not working?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

[SOLVED]Why is this code not working??

I have searched for solution on how to fix the error but I couldn't see.. https://code.sololearn.com/Wws3RDiGJ3Gd/?ref=app

15th Dec 2018, 8:25 PM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
6 Answers
+ 9
😎iYkE4LiFe😎 It appears that you aren't referencing the p5.speech.js file and this file doesn't exist on Cloudflare. I found this file available on the following URL: https://s3-us-west-2.amazonaws.com/s.cdpn.io/837599/p5.speech.js After you add this reference to the HTML page, the JS errors will disappear. However, I get the message in the console in Code Playground indicating webkitSpeechRecognition isn't supported in my browser for the SoloLearn App. You can try in my version of the code: https://code.sololearn.com/W6kh9zaEx6o1/?ref=app
16th Dec 2018, 5:07 AM
David Carroll
David Carroll - avatar
+ 7
Debugging is determining errors in Programming. If it's an error in syntax and the Interpreter or Compiler sends an error. If not, it's a logic formulation (algorithm). You need knowledge in data & control structures....
16th Dec 2018, 2:44 AM
Da2
Da2 - avatar
+ 7
David Carroll Thank you so much for your response I really appreciate..👌👌👌
16th Dec 2018, 6:07 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar
+ 5
Looks like it's an error in algorithm that produces an error. The program needs a variable to be defined.
16th Dec 2018, 2:47 AM
Da2
Da2 - avatar
+ 5
I'm not familiar with the p5 library. However, I did notice the JS scripts referenced in the HTML page are loading duplicate references. Remove the file references that don't end with "min.js". My next guess is the JavaScript files are loading out of order. The last file loaded may need to be referenced before the other two. That should leave you with one more error, which is something related to the p5.speechRec not being recognized as a constructor. I'd need to look into this further. But these should help get you further along.
16th Dec 2018, 4:28 AM
David Carroll
David Carroll - avatar
+ 4
Da2 Thank you also...👍👍👍
16th Dec 2018, 6:08 AM
Ikechukwu Okonkwo
Ikechukwu Okonkwo - avatar