openclaw - ✅(Solved) Fix [Bug]: [voice-call plugin] Twilio: bot audio cuts out in multi-second gaps during phone calls [1 pull requests, 3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#52111Fetched 2026-04-08 01:15:31
View on GitHub
Comments
3
Participants
2
Timeline
9
Reactions
0
Timeline (top)
commented ×3labeled ×2closed ×1cross-referenced ×1

Using built in voice-call plugin with Twilio bot audio cuts out in multi-second gaps during phone calls.

Root Cause

Using built in voice-call plugin with Twilio bot audio cuts out in multi-second gaps during phone calls.

Fix Action

Fixed

PR fix notes

PR #52155: fix: resolve Twilio audio cuts out in voice calls

Description (problem / solution / changelog)

Summary

Fixes the Twilio voice call audio cutting out issue by removing unnecessary delays in streaming/batch TTS and adding audio batching.

Changes

  • Remove unnecessary 20ms delays in streaming/batch TTS
  • Add audio batching (160 bytes = 20ms @ 8kHz) for better streaming efficiency
  • Fix audio streaming performance

Testing

  • Verified audio streaming works without delays
  • Tested with Twilio voice calls

Fixes #52111

Changed files

  • .agents/maintainers.md (added, +1/-0)
  • .agents/skills/merge-pr/SKILL.md (removed, +0/-185)
  • .agents/skills/merge-pr/agents/openai.yaml (removed, +0/-4)
  • .agents/skills/prepare-pr/SKILL.md (removed, +0/-248)
  • .agents/skills/prepare-pr/agents/openai.yaml (removed, +0/-4)
  • .agents/skills/review-pr/SKILL.md (removed, +0/-228)
  • .agents/skills/review-pr/agents/openai.yaml (removed, +0/-4)
  • .detect-secrets.cfg (modified, +19/-4)
  • .dockerignore (modified, +16/-0)
  • .env.example (modified, +80/-5)
  • .gitattributes (modified, +2/-0)
  • .github/ISSUE_TEMPLATE/bug_report.md (removed, +0/-34)
  • .github/ISSUE_TEMPLATE/bug_report.yml (added, +106/-0)
  • .github/ISSUE_TEMPLATE/config.yml (modified, +3/-3)
  • .github/ISSUE_TEMPLATE/feature_request.md (removed, +0/-22)
  • .github/ISSUE_TEMPLATE/feature_request.yml (added, +70/-0)
  • .github/actionlint.yaml (modified, +8/-2)
  • .github/actions/detect-docs-changes/action.yml (added, +53/-0)
  • .github/actions/ensure-base-commit/action.yml (added, +47/-0)
  • .github/actions/setup-node-env/action.yml (added, +109/-0)
  • .github/actions/setup-pnpm-store-cache/action.yml (added, +74/-0)
  • .github/codeql/codeql-javascript-typescript.yml (added, +18/-0)
  • .github/dependabot.yml (modified, +26/-12)
  • .github/instructions/copilot.instructions.md (added, +64/-0)
  • .github/labeler.yml (modified, +30/-0)
  • .github/pull_request_template.md (added, +115/-0)
  • .github/workflows/auto-response.yml (modified, +386/-14)
  • .github/workflows/ci.yml (modified, +416/-293)
  • .github/workflows/codeql.yml (added, +130/-0)
  • .github/workflows/docker-release.yml (modified, +235/-62)
  • .github/workflows/formal-conformance.yml (removed, +0/-134)
  • .github/workflows/install-smoke.yml (modified, +94/-17)
  • .github/workflows/labeler.yml (modified, +662/-28)
  • .github/workflows/sandbox-common-smoke.yml (added, +59/-0)
  • .github/workflows/stale.yml (added, +214/-0)
  • .github/workflows/workflow-sanity.yml (modified, +31/-1)
  • .gitignore (modified, +50/-4)
  • .mailmap (added, +13/-0)
  • .markdownlint-cli2.jsonc (modified, +1/-1)
  • .npmrc (modified, +1/-1)
  • .oxfmtrc.jsonc (modified, +6/-0)
  • .oxlintrc.json (modified, +5/-1)
  • .pi/extensions/diff.ts (modified, +11/-89)
  • .pi/extensions/files.ts (modified, +22/-82)
  • .pi/extensions/prompt-url-widget.ts (modified, +13/-16)
  • .pi/extensions/ui/paged-select.ts (added, +82/-0)
  • .pi/prompts/landpr.md (modified, +26/-23)
  • .pre-commit-config.yaml (modified, +54/-2)
  • .secrets.baseline (modified, +11788/-962)
  • AGENTS.md (modified, +96/-19)
  • CHANGELOG.md (modified, +2501/-77)
  • CONTRIBUTING.md (modified, +102/-6)
  • Dockerfile (modified, +201/-19)
  • Dockerfile.sandbox (modified, +11/-4)
  • Dockerfile.sandbox-browser (modified, +12/-6)
  • Dockerfile.sandbox-common (added, +47/-0)
  • README-header.png (removed, +0/-0)
  • README.md (modified, +82/-67)
  • SECURITY.md (modified, +217/-4)
  • VISION.md (added, +110/-0)
  • appcast.xml (modified, +621/-125)
  • apps/android/README.md (modified, +188/-11)
  • apps/android/THIRD_PARTY_LICENSES/MANROPE_OFL.txt (added, +93/-0)
  • apps/android/app/build.gradle.kts (modified, +186/-101)
  • apps/android/app/proguard-rules.pro (added, +28/-0)
  • apps/android/app/src/main/AndroidManifest.xml (modified, +32/-5)
  • apps/android/app/src/main/java/ai/openclaw/android/MainActivity.kt (removed, +0/-130)
  • apps/android/app/src/main/java/ai/openclaw/android/MainViewModel.kt (removed, +0/-174)
  • apps/android/app/src/main/java/ai/openclaw/android/NodeForegroundService.kt (removed, +0/-180)
  • apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt (removed, +0/-1271)
  • apps/android/app/src/main/java/ai/openclaw/android/ScreenCaptureRequester.kt (removed, +0/-65)
  • apps/android/app/src/main/java/ai/openclaw/android/SecurePrefs.kt (removed, +0/-274)
  • apps/android/app/src/main/java/ai/openclaw/android/gateway/DeviceAuthStore.kt (removed, +0/-26)
  • apps/android/app/src/main/java/ai/openclaw/android/gateway/DeviceIdentityStore.kt (removed, +0/-150)
  • apps/android/app/src/main/java/ai/openclaw/android/gateway/GatewayProtocol.kt (removed, +0/-3)
  • apps/android/app/src/main/java/ai/openclaw/android/gateway/GatewayTls.kt (removed, +0/-90)
  • apps/android/app/src/main/java/ai/openclaw/android/node/CameraCaptureManager.kt (removed, +0/-316)
  • apps/android/app/src/main/java/ai/openclaw/android/node/ScreenRecordManager.kt (removed, +0/-199)
  • apps/android/app/src/main/java/ai/openclaw/android/protocol/OpenClawProtocolConstants.kt (removed, +0/-71)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/ChatSheet.kt (removed, +0/-10)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/RootScreen.kt (removed, +0/-429)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/SettingsSheet.kt (removed, +0/-686)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/StatusPill.kt (removed, +0/-114)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatComposer.kt (removed, +0/-285)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatMarkdown.kt (removed, +0/-215)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatMessageListCard.kt (removed, +0/-111)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatMessageViews.kt (removed, +0/-252)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatSessionsDialog.kt (removed, +0/-92)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatSheetContent.kt (removed, +0/-147)
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/SessionFilters.kt (removed, +0/-49)
  • apps/android/app/src/main/java/ai/openclaw/android/voice/TalkModeManager.kt (removed, +0/-1257)
  • apps/android/app/src/main/java/ai/openclaw/app/CameraHudState.kt (renamed, +1/-1)
  • apps/android/app/src/main/java/ai/openclaw/app/DeviceNames.kt (renamed, +1/-1)
  • apps/android/app/src/main/java/ai/openclaw/app/LocationMode.kt (renamed, +2/-2)
  • apps/android/app/src/main/java/ai/openclaw/app/MainActivity.kt (added, +63/-0)
  • apps/android/app/src/main/java/ai/openclaw/app/MainViewModel.kt (added, +202/-0)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeApp.kt (renamed, +1/-1)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeForegroundService.kt (added, +158/-0)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt (added, +922/-0)
  • apps/android/app/src/main/java/ai/openclaw/app/PermissionRequester.kt (renamed, +1/-1)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Using built in voice-call plugin with Twilio bot audio cuts out in multi-second gaps during phone calls.

Steps to reproduce

  1. Configure voice-call plugin with Twilio, streaming enabled, and inboundGreeting set
  2. Call the Twilio number from an allowlisted number
  3. The bot answers and immediately begins speaking the configured greeting

Expected behavior

The greeting plays back smoothly.

Actual behavior

The greeting is audible but cuts out repeatedly in 1–3 second gaps. The call stays connected and the bot eventually finishes speaking, but the audio arrives in fragments. The same choppy behavior occurs on subsequent AI responses during the call.

OpenClaw version

OpenClaw 2026.3.13

Operating system

Raspberry Pi OS (Linux 6.12.75, arm64)

Install method

No response

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

openclaw (voice-call plugin) -> Twilio Media Streams (WebSocket) -> OpenAI TTS (synthesizeForTelephony)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Severity: blocks workflow Frequency : almost always Consequence voice call is unusable

Additional information

NOT_ENOUGH_INFO.

extent analysis

Fix Plan

To address the audio cutting out issue, we'll focus on adjusting the buffering and streaming settings for the Twilio voice-call plugin.

Step-by-Step Solution:

  1. Increase Buffer Size: Modify the voice-call plugin configuration to increase the buffer size for audio streaming. This can help reduce the likelihood of audio cutting out due to buffering issues.
  2. Adjust Streaming Settings: Ensure that the streaming settings are optimized for real-time audio transmission. This may involve tweaking settings such as bitrate, sample rate, or packetization.
  3. Implement Error Handling: Add error handling to the audio streaming code to detect and recover from potential errors that could cause audio gaps.

Example Code Snippet (Python):

import os

# Increase buffer size
buffer_size = 1024 * 16  # Adjust this value as needed

# Adjust streaming settings
streaming_settings = {
    'bitrate': 48000,
    'sample_rate': 16000,
    'packetization': 20
}

# Implement error handling
try:
    # Initialize audio streaming with adjusted settings
    audio_stream = initialize_audio_stream(buffer_size, streaming_settings)
    # Start streaming audio
    audio_stream.start()
except Exception as e:
    # Handle errors and recover if possible
    print(f"Error occurred: {e}")
    # Attempt to restart audio streaming
    audio_stream.restart()

Verification

To verify that the fix worked, repeat the steps to reproduce the issue and check for smooth audio playback. Monitor the audio streaming logs for any errors or warnings that could indicate issues with the fix.

Extra Tips

  • Regularly update the Twilio voice-call plugin and OpenClaw to ensure you have the latest fixes and improvements.
  • Consider implementing additional logging and monitoring to detect and diagnose audio streaming issues more effectively.
  • If issues persist, try adjusting the buffer size and streaming settings further to find an optimal configuration for your specific use case.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The greeting plays back smoothly.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: [voice-call plugin] Twilio: bot audio cuts out in multi-second gaps during phone calls [1 pull requests, 3 comments, 2 participants]