Skip to content

voice: Python Twilio adapter needs the same inbound speech gate as JS (#990) #991

Description

@drewdrewthis

python/scenario/voice/adapters/_twilio_server.py enqueues every 100 ms media batch unconditionally, exactly the JS bug fixed in #990: Twilio streams frames through silence, so the drain's tail-silence turn end never fires and a callee's turn only ends on hang-up or the hard ceiling. Port TwilioSpeechGate (RMS threshold 800 / hangover 400 ms / pre-roll 300 ms, measured on a real call; see the JS PR for the numbers) into the Python adapter with the same speech_gate option and disconnect-span counters.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions