mirror of
https://github.com/vitalityAI/therapist.git
synced 2025-04-13 08:10:17 -04:00
feat: added new polly voice
This commit is contained in:
parent
3edd54d75c
commit
8949a8502b
|
@ -43,6 +43,7 @@ app.post("/receive", async (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
gather.say(
|
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?"
|
"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}`);
|
console.log(`transferring call ${callId} to ${operatorPhone}`);
|
||||||
|
|
||||||
transferSession(req.body.CallSid, 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({});
|
const dial = twiml.dial({});
|
||||||
dial.number(operatorPhone);
|
dial.number(operatorPhone);
|
||||||
|
@ -90,7 +94,7 @@ app.post("/respond", async (req, res) => {
|
||||||
|
|
||||||
let response = await chat(callId);
|
let response = await chat(callId);
|
||||||
|
|
||||||
gather.say(response);
|
gather.say({ voice: "Polly.Joanna" }, response);
|
||||||
await addMessage(callId, Role.BOT, response);
|
await addMessage(callId, Role.BOT, response);
|
||||||
|
|
||||||
twiml.redirect("/call/respond");
|
twiml.redirect("/call/respond");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user