How can i improve the tts to understand silent voi...
# ask-ai
w
How can i improve the tts to understand silent voices
t
Thanks for reaching out, Lukas. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like you mean the system is missing very quiet/soft speech. Do you mean TTS (synthesizing speech) or STT (speech-to-text / voice detection)? Improving detection of quiet voices involves STT/VAD and audio pre-processing, not TTS. If you mean STT/VAD, tell me which of these you’re using so I can give targeted steps: • LiveKit agent plugins (Silero VAD, BVC noise cancellation) • A cloud STT provider (Deepgram, Google, Azure) • A custom/local model Meanwhile, high-level steps you can try: • Apply Background Voice Cancellation (BVC) before STT to remove noise and boost primary speaker clarity. • Lower VAD thresholds and reduce
min_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 | DeepWiki
w
I mean STT and Silero VAD, BVC Krisp and Deepgram
t
Great — thanks for the details. Below are concrete, prioritized steps you can apply to improve detection of very quiet/soft speech using Silero VAD, BVC (Krisp), and Deepgram within a LiveKit agent pipeline. 1) Pipeline order (recommended) • Apply BVC (Krisp) first to remove background noise. • Feed the cleaned audio into Silero VAD (with tuned sensitivity). • Send VAD-cut segments to Deepgram for STT. 2) BVC (Krisp) tips • Enable BVC on the inbound audio stream so the STT receives the primary speaker with less background interference. • Run BVC locally before any buffering/streaming to avoid introducing latency into VAD/STT. 3) Silero VAD tuning • Lower the speech detection threshold so quieter speech is classified as speech: ◦ Reduce the probability/energy threshold used to mark frames as speech. ◦ Decrease
min_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?
w
How do i use Krisp/BVC correctly? also on inbound calls
t
Thanks — since you’re using Silero VAD, Krisp/BVC, and Deepgram, below are concrete steps and examples to correctly apply Krisp/BVC (including inbound calls) so quiet voices reach STT reliably. Which runtime do you want code for: Python or Node.js? I’ll give snippets for that one. Quick plan (apply in this order): 1. Enable Krisp at the SIP trunk (inbound) so PSTN callers get baseline noise suppression. 2. Route inbound calls to a room where your agent runs. 3. In the agent, enable BVC/BVCTelephony on the audio input before VAD so overlapping voices and background speech are removed server-side. 4. Run Silero VAD on the cleaned audio with lowered thresholds and frame smoothing, then send segments to Deepgram (with AGC or Deepgram AGC enabled). Configuration highlights and actionable snippets • SIP trunk (inbound) — enable Krisp on trunk
Copy code
{
  "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)
Copy code
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:
Copy code
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