I'm building a VoiceBot using Twilio Media Streams with the following flow: Speech-to-Text (STT) → LLM → Text-to-Speech (TTS) I'm currently using AWS Polly for the TTS component and have declared the AWS Class as a global variable when the Twilio server starts. Everything works as expected initially. However, after a long period of inactivity (around 2 hours or more), when a new call comes in, the process reaches the speech synthesis step, but...
Originally asked by J7er on Stack Exchange (stackoverflow) (CC BY-SA 4.0).