v0.1.3Latest
Added
Noise suppression of the caller's audio, opt in per agent:
[audio] noise_suppression = "rnnoise"(default"off") filters the audio before the voice activity detector and the turn detector hear it, with RNNoise through the pure-Rustnnnoiselesscrate (BSD-3-Clause; cargo featuredenoise-rnnoise, not in the default features ofbrisvox-server; a server built without it refuses the file at the key's position). The filter runs on the inference pool inside the VAD batch job, costs about 0.35 % of one core per call (0.45 % on an 8 kHz call) and adds 20 to 25 ms of delay to what the VAD hears; it never delays or drops the caller's audio, and a failing or overloaded filter lets the audio through unfiltered.denoise_stt = truealso sends the filtered audio to the speech-to-text provider (defaultfalse: independent studies found that denoised audio often raises the word error rate). Library:brisvox_inference::denoise(the streamingDenoisertrait,VadStream::with_denoiser),SessionBuilder::with_denoise,DenoiseStatsSnapshot. A call below a filter's minimum sample rate runs without it (logged once), and a filter that cannot be built leaves the call with the plain audio and a warning; both are counted inbrisvox_engine_events_total{event="denoise_bypassed_narrowband" | "denoise_build_failures" | "denoise_errors" | "denoise_feed_dropped"}. Measured with 34 real noise recordings (bench/results/denoise-*.md): it does no harm on clean audio but did not reduce false speech starts on wideband audio and shifted Smart Turn verdicts on telephone audio, so it stays off by default and is meant to be tested on one's own calls.brisvox-bench denoise cpu|quality|transcribemeasures the CPU per call, the false barge-ins and turn verdicts under licensed noise (fixtures/noise, public domain), and streams the same mixes to a sherpa-onnx server for the word error rate.Reload the agent file without a restart. Edit the agent file and
POST /admin/reloadon the health listener (orkill -HUPthe server on Unix, or setBRISVOX_AGENT_RELOAD_POLL_MSto have the file polled for changes): new calls run the new definition, calls in progress keep theirs until they end. The new file is validated like the start validates it, MCP servers included; an invalid file, an MCP server that cannot be reached or a change that needs a restart (the[recording]table, a provider limit or Smart Turn model the start did not set up) leaves the old definition running and is reported with the file position. The MCP servers and provider connections of the old definition close when its last call ends. The endpoint answers JSON and needsBRISVOX_ADMIN_TOKEN(a separate secret from the metrics token) unless the health listener is on loopback; off a loopback address without a token it is off. The file poll asks for a reload once per change, so a refused file is not retried every interval. The server now handlesSIGHUP(a closed terminal reloads instead of ending it). New metricsbrisvox_agent_reloads_total{result}andbrisvox_agent_generation, one log line per reload. Seedocs/OPERATIONS.md("Reloading the agent") anddocs/CONFIG.md. For embedders, the newbrisvox_server::reloadmodule has the pieces (SwapRunner,RunnerRecipe,AgentSet,ReloadHub).Language switching mid-call. An agent file can list several languages with
[languages]and[[languages.speak]](a voice, and optionally a TTS model, for each). The speech-to-text then listens to all of them for the whole call (Deepgramlanguage=multi, AssemblyAI language detection, Gladia code switching, OpenAIlanguages), and when the caller speaks another listed language on two utterances in a row (configurable, or once when the provider is confident) the next reply is in that language, with that language's voice, without a new call. The language comes from the STT provider's report (newlanguagefield onSttEvent::Transcript) or, when it reports none, from a text detector. The reply language is pinned per turn with aReply in <language>.line, never in the middle of a response. A file that lists a language its TTS provider cannot speak (Deepgram Aura, Kokoro and Turkish) is refused at its position. New metricbrisvox_language_switches_total, new agent protocol eventlanguage.switched, newTtsConfig::languageandTtsConfig::modelfor adapters, exampleexamples/agents/multilingual-tr-en.toml. Seedocs/CONFIG.md, "Languages".
Changed
Cheaper turn detection is the default: the Smart Turn model runs with each GELU fused into one operation (
BRISVOX_SMART_TURN_GRAPH=fused; about 40% less memory traffic per analysis and more calls per core under load). In 0.1.2 it was opt-in because one early verdict on a test cut ended a turn the published graph did not; measured on the official test set, both graphs do that at the same small rate and end the same number of turns too soon (4000 clips with VNNI, 1000 without;bench/results/smart-turn-early-verdict-2026-10-31.md).BRISVOX_SMART_TURN_GRAPH=originalruns the file as published.Adapter API (library users):
SttEvent::Transcripthas a new fieldlanguage: Option<SpokenLanguage>(the language the STT provider reported for a final segment;Nonewhen it reports none), andTtsConfighas two new fields,languageandmodel(the language and TTS model a session should speak,Noneto keep the adapter's own). Code that builds these values with struct literals must add the fields; code that matchesSttEvent::Transcriptwithout..must name the new field. The agent protocol gains thelanguage.switchedevent (newLanguageSwitchedmessage in the Python and TypeScript SDKs).Background speech and echo handling, measured against the engine's real barge-in guards (
bench/results/noise-handling-calls.md,docs/LATENCY.md, "Noise handling beyond a denoiser"):[audio] noise_suppression = "hush"(experimental): Hush (Apache-2.0, pure Rust, trained for voice agents with competing speakers; cargo featuredenoise-hush, not in the default features) as the filter in front of the VAD and the turn detector: 1 % of a core per call, 10 ms of delay; takes a second voice 15 to 20 dB under the caller and the bot's echo out of the barge-ins in many calls, no extra delay for a real barge-in. Its gain depends on the input level (it removes the speech of a quiet caller and distorts 8 kHz phone audio), so a call below 16 kHz runs without it (logged, counted) and the agent file refuses it withcall_sample_ratebelow 16000.brisvox-bench denoise safetychecks that a filter leaves clean speech at three caller levels alone."rnnoise"measured worse than nothing for the VAD and is not in the default features either.[interruption] echo_text_match: holds a barge-in whose words are the bot's own, just said (the bot's voice coming back); needsmin_words >= 1. Removed the echo case completely in the measurements. A caller who repeats the bot's words back while it speaks is held like the echo until other words appear (the texts are the same); short commands (at most two words with "stop", "wait", "no", ...) always get through.[vad] level_gate_db: speech may only start within that many dB of the caller's own level, so a quieter second voice cannot start a barge-in.- Library:
brisvox_inference::Gated(level gates and a noise-floor estimate over any speech model),brisvox_inference::denoise::blend::Blended(dry/wet mix for any denoiser),brisvox_agent::{TurnMachine::set_echo, TurnMachine::set_interruption, echoes_bot, is_bot_echo, NoiseAdapt}.brisvox-bench denoise callsdrives the real turn machine and policy over calls with background speech (LibriSpeech,fixtures/interferers), bot echo and noise.
Fixed
- tokio 1.53.3 in the lock file (RUSTSEC-2026-0386,
AsyncFd::newand related constructors violate I/O safety). brisvox does not call those constructors; the crates take any tokio 1.x, so their users pick up the fix withcargo update -p tokio.