vocodedev/vocode-core

Refactor interruptions into output device

ajar98 opened this issue · 0 comments

Currently, we manage the way playback works (i.e. rate limiting audio chunks into the output device, sending mark messages to know when Twilio has played an audio chunk) within StreamingConversation and TwilioPhoneConversation.

Instead, we should move all of this logic into the output device, and allow StreamingConversation to:

  • push audio chunks into the output device
  • receive a callback once all chunks have been played
  • interrupt the output device and know how many chunks have been played

This allows us to:

  • Support other pipeline architectures other than StreamingConversation
  • Onboard new output devices easily (e.g. LiveKit)