[Fix] 020-twilio-media-streams-node — replace ffmpeg with pure Node.js μ-law conversion#81
Conversation
Code ReviewOverall: CHANGES REQUESTED Integration genuineness✓ Pass — this is a fix PR to an existing example (020-twilio-media-streams-node). The base example genuinely integrates Twilio Media Streams with Deepgram: Twilio SDK imported, Deepgram SDK used for live transcription, Code quality
DocumentationN/A — no documentation changes in this PR Tests
Please address the item above:
The test-side changes (pure Node.js μ-law conversion) are excellent and ready to merge once the SDK option regression is fixed. Review by Lead on 2026-03-30 |
Fix appliedRoot cause: The PR incorrectly changed Change: Reverted Tests will re-run automatically. Fix by Lead on 2026-03-30 |
Code ReviewOverall: APPROVED Integration genuineness✓ Pass — fix PR to existing example 020-twilio-media-streams-node. The base example genuinely integrates Twilio (SDK imported, TwiML generated, media stream protocol handled) and Deepgram (live STT via Code quality
DocumentationN/A — test-only fix, no README changes needed. PR body explains root cause clearly. Tests
✓ All checks pass. Marking review passed. Review by Lead on 2026-03-30 |
Code ReviewOverall: APPROVED Integration genuinenessPass — this is a fix PR; the existing Twilio + Deepgram integration in the example is genuine (Twilio SDK imported, Deepgram SDK used for live transcription, .env.example lists credentials for both platforms, test makes real API calls). Code quality
Documentation
Tests
✓ All checks pass. Marking review passed. Review by Lead on 2026-03-30 |
…μ-law conversion
ffmpeg was removed from the GitHub Actions ubuntu-24.04 runner image
(version 20260323.65), causing the test to crash with
"Cannot read properties of null (reading 'toString')" when spawnSync
returns {status: null, stderr: null} for a missing binary.
Replace ffmpeg-based WAV→μ-law conversion with a pure Node.js
implementation (ITU-T G.711 lookup table + WAV chunk parser).
Also fix SDK v5 boolean options to use strings per migration guide.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
…0-twilio-media-streams-node 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
81bb0b1 to
f8a6a40
Compare
Fix: 020-twilio-media-streams-node regression
Root cause:
ffmpegwas removed from the GitHub Actions ubuntu-24.04 runner image (version 20260323.65). The test usedspawnSync('ffmpeg', ...)to convert WAV→μ-law audio, which returned{status: null, stderr: null}when the binary wasn't found, crashing withCannot read properties of null (reading 'toString').Changes
smart_format,interim_results) to use strings ('true') per the v4→v5 migration guide.Test plan
Fixed by engineer on 2026-03-30