Impact-ul Packet Loss
Pe internet, pierderea de pachete e inevitabilă. Voice AI trebuie să gestioneze graceful până la 5% loss fără impact perceput de utilizator.
<1%
Imperceptibil
1-5%
Manageable
>5%
Problematic
Loss Rate Impact
| Loss Rate | Impact | Recommended Action |
|---|---|---|
| 0-1% | Imperceptibil | PLC handles seamlessly |
| 1-3% | Minor glitches | FEC + PLC effective |
| 3-5% | Noticeable degradation | Consider reducing bitrate |
| 5-10% | Significant quality loss | Emergency mode, retry |
| >10% | Unusable | Connection recovery needed |
Mitigation Techniques
Forward Error Correction (FEC)
Send redundant data to recover lost packets
Overhead: 10-30% bandwidth
Effectiveness: Can recover up to 5% loss
Packet Loss Concealment (PLC)
Reconstruct missing audio from surrounding frames
Overhead: CPU only
Effectiveness: Hides single packet gaps
Retransmission (ARQ)
Request lost packets again
Overhead: Adds latency
Effectiveness: Not suitable for real-time
Redundant Audio
Send previous frame with current
Overhead: 50-100% bandwidth
Effectiveness: Very robust
PLC Methods Comparison
| Method | Quality | How it Works |
|---|---|---|
| Zero Substitution | Poor | Replace with silence |
| Packet Repetition | Fair | Repeat last good packet |
| Waveform Substitution | Good | Pitch-scaled repetition |
| Model-Based | Excellent | LP coefficient extrapolation |
Opus FEC Configuration
// Opus codec with inband FEC
const encoder = new OpusEncoder({
sampleRate: 48000,
channels: 1,
application: 'voip',
// Enable FEC
inbandFEC: true,
// Expect 10% packet loss
packetLossPerc: 10,
// Use DTX for silence suppression
useDTX: true
});
// Decoder will use FEC to recover lost packets
const decoder = new OpusDecoder({
sampleRate: 48000,
channels: 1,
// Enable FEC decoding
useFEC: true
});