Pipeline dan Backpressure¶
Ranya memakai pipeline bertahap yang berjalan per call.
Urutan Processor Default¶
pkg/ranya/engine.go:
- Pre‑processor
- STT
- Turn
- Before‑context
- Context
- Router
- Before‑LLM
- LLM
- Tool dispatcher
- Before‑TTS
- TTS
- Post‑processors
Mode Backpressure¶
drop: frame dibuang saat penuh.wait: menunggu slot.
Kapan dipakai:
- Drop untuk latensi rendah.
- Wait untuk test/offline.
Resep Tuning¶
| Target | Setting |
|---|---|
| Latensi terendah | backpressure=drop, buffer kecil. |
| Reliabilitas tinggi | backpressure=wait, buffer besar. |
| Debug deterministik | pipeline.async=false. |
| Beban tinggi | naikkan highcapacity, lowcapacity, stagebuffer. |
Diagram¶
flowchart LR
In[Input Frames] --> PQ[Priority Queue]
PQ --> S0[Stage 0]
S0 --> S1[Stage 1]
S1 --> S2[Stage N]
S2 --> Out[Output Frames]
PQ --> H[High Control]
PQ --> L[Low Audio and Text]