Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Based on the code below please help me answer the question and if possible expla

ID: 3741827 • Letter: B

Question

Based on the code below please help me answer the question and if possible explain why thats the answer. thank you

Question 1: What type of variable is “langs”,  is it an integer, a float, a boolean, a string, or an array?

Question 2: What do you think ‘webkitSpeechRecognition’is on line 225?  Do you think this mysterious thing exists only in Chrome web browser? Why?

Question 3: What do you think the ‘recognition’variable is?  How many events and their corresponding handlers are registered with this object? What are they?

Question 4: Can you point out where the in the server.js file the feedback is logged in the Node server console? (You can type the code out or give the line number.)

Question 5: What do I need to change if I want this web application to run on localhost port 3333 instead of port 5000? (Which line to change? How will you change it?)

Explanation / Answer

Answer for Question 1:

Variable "langs" is of type array.

Answer for Question 2:

webkitSpeechRecognition is a JavaScript Web Speech API. webkitSpeechRecognition is used for handling the recording and transcribing of speech. It means it will listen to what we say and converts our words to string. webkitSpeechRecognition works only with Chrome Web Browser

Answer for Question 3:

Variable "recognition" is used to create an instance of the API webkitSpeechRecognition. There are 4 events registered with recognition variable.

1 - onstart is a property of webkitSpeechRecongnition. It represents an event handler which will run when the speech recognition function starts listening to incoming audio.

2 - onerror is another property of webkitSpeechRecognition. It represents an event handler which runs when an error occurs in speech recognition function.

3 - onend is a property of webkitSpeechRecognition. It represents an event which runs when the speech recognition function gets disconnected or stops working.

4 - onresult is too a property of webkitSpeechRecognition. It represents an event which runs when the speech recognition function returns a result. The function returns the result when a word or statement has been recognised correctly.

Answer for Question 5:

The port number can be changed in XML file of the server.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote