wonderful-wolf-51568
12/02/2025, 2:52 PMtall-airline-16756
12/02/2025, 2:52 PMtall-airline-16756
12/02/2025, 2:52 PMmin_speech_duration so short/soft utterances are detected.
• Chain BVC → VAD → STT (clean audio first, then detect speech).
• Use an STT model tuned for low-volume audio (Deepgram/Google variants with AGC/sensitivity settings).
• If using client devices, enable automatic gain control or increase microphone gain on the client side.
Which setup are you using (agent plugin + language), and can you share sample VAD/agent settings or the STT provider? I’ll give concrete commands/config snippets next.
Sources: Enhanced noise cancellation | LiveKit docs | Speech-to-text (STT) models | LiveKit Docs | Deepgram STT plugin guide | LiveKit docs | examples/voice_agents | livekit/livekit_composite | DeepWikiwonderful-wolf-51568
12/02/2025, 2:53 PMtall-airline-16756
12/02/2025, 2:53 PMmin_speech_duration (e.g., 0.08–0.15s) so short, quiet utterances aren’t dropped.
◦ Increase min_silence_duration slightly to avoid chopping soft continuous speech into fragments.
• Use frame-level smoothing (e.g., majority-vote over 3–5 frames) to avoid false negatives from brief low-energy dips.
• If Silero exposes model temperature/score scaling, bias scores toward speech for low-energy segments.
4) Deepgram configuration
• Use a model variant optimized for noisy/low-volume audio if available.
• Enable or tune automatic gain control (AGC) on Deepgram (or perform AGC client-side) so the input level is normalized before STT.
• Send VAD timestamps / contextual hints with each segment to Deepgram so it focuses decoding on the provided audio ranges.
• Increase beam/alternatives or enable enhanced decoding options if Deepgram offers sensitivity modes.
5) Audio preprocessing and capture
• If possible, enable client-side AGC or raise mic gain for soft speakers.
• Ensure audio is sent at 16 kHz or higher, PCM, and with minimal compression artifacts.
• Use a short input buffer so VAD sees near-real-time frames (avoid too-large chunking which can mask quiet speech).
6) Runtime monitoring & metrics
• Log VAD frame scores, BVC SNR improvements, and Deepgram confidence for hard-to-detect segments to iterate on threshold values.
• Test with recorded samples of the quiet voices you care about and tune thresholds against those samples.
7) Quick checklist to try now
• Turn on Krisp/BVC before VAD.
• Lower Silero VAD threshold; set min_speech_duration ≈ 0.1s.
• Enable AGC (client-side or Deepgram).
• Send short (200–500ms) frames to VAD with smoothing and then forward segments to Deepgram.
If you’d like, I can provide:
• Example Silero VAD config snippet for your language (Python or Node).
• Example code showing BVC → VAD → Deepgram streaming in your preferred runtime.
Which language/runtime do you want the snippets in?wonderful-wolf-51568
12/02/2025, 4:59 PMtall-airline-16756
12/02/2025, 5:00 PM{
"trunk": {
"name": "My Inbound Trunk",
"numbers": [
"+15105550100"
],
"krisp_enabled": true
}
}
Use this when creating your SIP inbound trunk so incoming PSTN audio receives Krisp noise cancellation before entering LiveKit.
• Agent setup — enable BVC (Python example)
from livekit.plugins import noise_cancellation
from livekit.agents.voice import room_io
await session.start(
room=ctx.room,
agent=Assistant(),
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
# Use BVCTelephony for telephony callers (low bitrate)
noise_cancellation=noise_cancellation.BVCTelephony(),
),
),
)
Notes:
• Use BVCTelephony() for telephony/SIP inbound calls (optimized for low bitrate).
• Do not enable Krisp on the frontend when using BVC in the agent — double processing can worsen quality.
• VAD tuning (Silero) — recommended parameters
1. Lower detection threshold (so low-energy frames count as speech).
2. Set min_speech_duration ≈ 0.08–0.15s.
3. Increase min_silence_duration slightly to avoid chopping soft continuous speech.
4. Apply frame-level smoothing (majority vote over 3–5 frames) to avoid transient false negatives.
Example Silero-like pseudocode:
vad = SileroVAD(threshold=0.35, min_speech_duration=0.1, min_silence_duration=0.4)
frames = get_frames(cleaned_audio) # cleaned_audio after BVC
speech_segments = vad.detect_with_smoothing(frames, smoothing_window=5)
• Deepgram / STT tips
• Enable AGC (client-side or Deepgram’s AGC) so quiet inputs are normalized.
• Send short segments (200–500 ms) from VAD to Deepgram rather than huge chunks.
• Provide VAD timestamps/context to Deepgram to focus decoding on candidate speech.
• If available, pick Deepgram model modes tuned for low-volume / noisy audio and increase decoding alternatives if needed.
Operational checklist
• Turn on krisp_enabled: true for inbound trunk.
• Ensure inbound calls are routed to rooms with your agent that has BVCTelephony() enabled.
• Do not enable frontend Krisp if BVC runs in the agent.
• Lower Silero VAD thresholds and use smoothing.
• Enable AGC and use short VAD segments to Deepgram.
• Log VAD scores, BVC SNR improvements, and Deepgram confidence to iterate thresholds.
If you want, I can now:
• Provide a full Python or Node.js end-to-end sample showing: SIP inbound → trunk Krisp → agent with BVCTelephony() → Silero VAD config → sending segments to Deepgram.
Which language do you prefer?
Sources: Enhanced noise cancellation | LiveKit docs | SIP inbound trunk | LiveKit docs | Voice AI quickstart | LiveKit docs | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | sip | livekit/livekit_composite | DeepWiki