Skip to content

voice-out-elevenlabs: ElevenLabs TTS voice-out channel#77

Open
webdevtodayjason wants to merge 1 commit intocodex/ops-team-bootstrapfrom
codex/voice-out-elevenlabs
Open

voice-out-elevenlabs: ElevenLabs TTS voice-out channel#77
webdevtodayjason wants to merge 1 commit intocodex/ops-team-bootstrapfrom
codex/voice-out-elevenlabs

Conversation

@webdevtodayjason
Copy link
Copy Markdown
Contributor

Summary

  • New src/channels/voice-out.ts exposing createVoiceOutChannel({ bus, getKey, ... }).
  • Subscribes to bus (cli by default); on kind: "completion" POSTs {text, model_id} to https://api.elevenlabs.io/v1/text-to-speech/{voiceId}/stream?output_format=pcm_22050 with xi-api-key, then streams PCM response chunks into the aplay child stdin.
  • kind: "error" triggers the same pipeline with a short apology string.
  • fetchImpl and spawn are injectable; default spawn uses node:child_process and invokes aplay -q -f S16_LE -r 22050 -c 1.
  • stop() unsubscribes and ends the aplay stream. Strict TS, no any, no globals mutated.

Validation

  • pnpm check → exit 0
  • pnpm test tests/channels/voice-out.test.ts → 3/3 passed

Test plan

  • Fake bus + fake fetch (ReadableStream of PCM) + fake spawn (PassThrough): asserts URL, xi-api-key, body, aplay args, and that PCM bytes flow to the injected stream.
  • Error message path invokes TTS with an apology body.
  • stop() unsubscribes from the bus and calls .end() on the aplay stream.

Contract: ops/contracts/engineer-auth.contract.md
Slice: voice-out-elevenlabs

Task 021 — engineer-auth. Implements createVoiceOutChannel: subscribes
to bus completion/error messages, POSTs text to ElevenLabs streaming
TTS, pipes PCM chunks into an injected spawn (aplay by default). fetch
and spawn are both injectable for deterministic testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d293401f-ead1-44b1-ad3d-1c49077ecbb9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/voice-out-elevenlabs

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant