Skip to content

refactor(pipeline): migrate ws egress to Redis Pub/Sub and optimize A…#73

Merged
aniebietafia merged 1 commit into
mainfrom
fix/audio_transcribe_pipeline
May 22, 2026
Merged

refactor(pipeline): migrate ws egress to Redis Pub/Sub and optimize A…#73
aniebietafia merged 1 commit into
mainfrom
fix/audio_transcribe_pipeline

Conversation

@aniebietafia
Copy link
Copy Markdown
Contributor

…I translation pipeline

  • Replace per-user AIOKafkaConsumer in WebSocket routers with Redis Pub/Sub subscriptions for room-specific audio egress (pipeline:audio:{room_code}) and captions (pipeline:captions:{room_code}).
  • Refactor TranslationWorker to perform translations concurrently with asyncio.gather, and add per-language error resilience.
  • Add client-side buffering to STTWorker with a periodic stale buffer sweeping/cleanup mechanism.
  • Implement persistent HTTP connections (connection pooling) across DeepL, OpenAI TTS, and Voice.ai clients via a singleton client pattern.
  • Scale pipeline Kafka topics to 3 partitions for horizontal worker scaling.
  • Mock Redis client and Connection Manager in unit tests, fix STT buffering assertions, and resolve all 205 test failures.
  • Add comprehensive docs/frontend-angular-integration.md guide.
  • Format all files and resolve Ruff lints.

…I translation pipeline

- Replace per-user AIOKafkaConsumer in WebSocket routers with Redis Pub/Sub subscriptions for room-specific audio egress (`pipeline:audio:{room_code}`) and captions (`pipeline:captions:{room_code}`).
- Refactor TranslationWorker to perform translations concurrently with asyncio.gather, and add per-language error resilience.
- Add client-side buffering to STTWorker with a periodic stale buffer sweeping/cleanup mechanism.
- Implement persistent HTTP connections (connection pooling) across DeepL, OpenAI TTS, and Voice.ai clients via a singleton client pattern.
- Scale pipeline Kafka topics to 3 partitions for horizontal worker scaling.
- Mock Redis client and Connection Manager in unit tests, fix STT buffering assertions, and resolve all 205 test failures.
- Add comprehensive docs/frontend-angular-integration.md guide.
- Format all files and resolve Ruff lints.

Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Review limit reached

@aniebietafia, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 4 minutes and 57 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0fa10f66-a70e-4e75-9617-788d7697886c

📥 Commits

Reviewing files that changed from the base of the PR and between aeb3a7d and 3d968ca.

📒 Files selected for processing (23)
  • app/core/config.py
  • app/db/session.py
  • app/external_services/deepgram/service.py
  • app/external_services/deepl/service.py
  • app/external_services/openai_tts/service.py
  • app/external_services/voiceai/service.py
  • app/kafka/consumer.py
  • app/kafka/manager.py
  • app/modules/auth/constants.py
  • app/modules/meeting/constants.py
  • app/modules/meeting/schemas.py
  • app/modules/meeting/state.py
  • app/modules/meeting/ws_dependencies.py
  • app/modules/meeting/ws_router.py
  • app/schemas/pipeline.py
  • app/services/audio_bridge.py
  • app/services/stt_worker.py
  • app/services/translation_worker.py
  • app/services/tts_worker.py
  • tests/meeting/test_ws_router.py
  • tests/test_core/__init__.py
  • tests/test_kafka/__init__.py
  • tests/test_kafka/test_pipeline.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/audio_transcribe_pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@aniebietafia aniebietafia merged commit 1570d48 into main May 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant