From 8949a8502bbaef73da0e4540218b88ce5e6c29c2 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Sun, 5 Mar 2023 05:08:27 -0500 Subject: [PATCH] feat: added new polly voice --- src/api/call.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/call.js b/src/api/call.js index ebf20fe..deb5b77 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -43,6 +43,7 @@ app.post("/receive", async (req, res) => { }); gather.say( + { voice: "Polly.Joanna" }, "Welcome to the Suicide Prevention Hotline. You have reached a virtual resource where you can talk through your problems in a safe and supportive environment. Please know that you are not alone, and help is available. How are you feeling right now?" ); @@ -70,7 +71,10 @@ app.post("/respond", async (req, res) => { console.log(`transferring call ${callId} to ${operatorPhone}`); transferSession(req.body.CallSid, operatorPhone); - twiml.say("We're connecting you to a counselor now."); + twiml.say( + { voice: "Polly.Joanna" }, + "We're connecting you to a counselor now." + ); const dial = twiml.dial({}); dial.number(operatorPhone); @@ -90,7 +94,7 @@ app.post("/respond", async (req, res) => { let response = await chat(callId); - gather.say(response); + gather.say({ voice: "Polly.Joanna" }, response); await addMessage(callId, Role.BOT, response); twiml.redirect("/call/respond");