Speaking Practice
Greeting & Introduction
Anna : Hello!
Student : Hello!
Anna : Good morning.
Student : Good morning.
Anna : What is your name?
Student : My name is __________.
Anna : Nice to meet you.
Student : Nice to meet you too.
Anna : How are you today?
Student : I am fine, thank you.
Anna : Goodbye.
Student : See you later.
function speak(text){
let speech=new SpeechSynthesisUtterance(text);
speech.lang="en-US";
speech.rate=0.9;
speech.pitch=1;
window.speechSynthesis.speak(speech);
}
function playConversation(){
const dialog=[
"Hello!",
"Hello!",
"Good morning.",
"Good morning.",
"What is your name?",
"My name is John.",
"Nice to meet you.",
"Nice to meet you too.",
"How are you today?",
"I am fine thank you.",
"Goodbye.",
"See you later."
];
let i=0;
function next(){
if(i
"+text;
}
recognition.onerror=function(){
document.getElementById("answer").innerHTML=
"Microphone not detected.";
}