-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voice is not coming from server to phone on EC2 deployment | Working on local environment #44
Comments
Hello, @BhargabSixthSens I have the same result, I make the connection and it completes and connects but it is silent on the gpt side. |
This is due to start event is not coming in hosted server. if (msg.event === 'start') {
streamSid = msg.start.streamSid;
callSid = msg.start.callSid;
streamService.setStreamSid(streamSid);
gptService.setCallSid(callSid);
// Set RECORDING_ENABLED='true' in .env to record calls
recordingService(ttsService, callSid).then(() => {
console.log(`Twilio -> Starting Media Stream for ${streamSid}`.underline.red);
ttsService.generate({partialResponseIndex: null, partialResponse: 'Hello! I understand you\'re looking for a pair of AirPods, is that correct?'}, 0);
});
} One workaround I found You can pass the callSid from body as a param in wss link here And here you can pass a second param use
app.ws('/connection/:callSid', (ws,req) => {
const {callSid} = req.params;
... use callSid to set gpservice callSid else if (msg.event === 'media') {
if (!streamService.streamSid) {
streamService.setStreamSid(msg.streamSid);
recordingService(ttsService, callSid).then(() => {
console.log(`Twilio -> Starting Media Stream for ${streamSid}`.underline.red);
ttsService.generate({partialResponseIndex: null, partialResponse: 'Hello! I understand you\'re looking for a pair of AirPods, is that correct?'}, 0);
});
}
transcriptionService.send(msg.media.payload);
} |
Hi, I am facing an issue.
When I deploy this to EC2 voice is not coming from server to my phone.
It is working on local environment.
I am getting response from gpt and text to speech service is also working I think.
What could be the issue?
The text was updated successfully, but these errors were encountered: