Skip to navigation

Background Voice Cancellation

Remove background voices and noise before transcription, with Speech to Text or as a standalone plugin.

Background voice cancellation keeps the person speaking and removes other voices and noise, such as a television, people nearby, or street and office noise, before transcription or your agent hears the audio.

With Speech to TextStandalone plugin
Where it runsOn Finch, in Murf’s cloudIn the agent process
Who can use itOnly when Murf transcribesAny speech-to-text provider
What you installNothing extralivekit-plugins-murf-bvc
PriceIncluded in the Speech to Text priceStandalone pricing
OfflineNoYes, with MURF_BVC_LICENSE

With Speech to Text

Set bvc=true when you connect to Finch. Finch removes background voices before it transcribes, at no extra cost. This applies only when Murf is the speech-to-text provider.

On a streaming WebSocket, pass bvc=true as a query parameter. On file transcription, pass bvc=true on the upload. In LiveKit, the same flag is murf.STT(..., bvc=True). The Finch model page describes the same flag.

It cannot be combined with diarize. Streaming closes the socket with 4002, and file transcription returns 400. On file transcription it adds about 3 to 4 minutes of processing per hour of audio. If the enhancement pool is busy, the file is transcribed without it.

Standalone plugin

livekit-plugins-murf-bvc is a CPU filter that runs inside the agent process, before voice activity detection, turn detection, and speech-to-text. Audio never leaves the process. It works with any speech-to-text provider, including when Murf is not transcribing.

Requirements:

  • Python 3.10 or later, and livekit-agents 1.2 or later.
  • Linux with glibc 2.28 or later (x86_64 or aarch64), or macOS 11 or later on Apple Silicon and macOS 10.15 or later on Intel.
  • AVX2 and FMA on x86_64 (Intel Haswell or newer, or any AMD Zen). On ARM, AWS Graviton2 or newer, or any Apple Silicon Mac.

Latency is 10 ms at 16 kHz, and about 13.6 ms at 24 or 48 kHz, resampling included. CPU use is about 3% of one core per participant.

With no valid license, audio passes through unchanged.

Online mode (LiveKit)

Online mode exchanges a Murf API key for a short-lived license. Set MURF_API_KEY. Any workspace API key works. A key does not need to be enabled for background voice cancellation.

Install the plugin on its own, or with Murf speech-to-text and text-to-speech:

pip install livekit-plugins-murf-bvc
pip install "livekit-murf[bvc]"

Call murf_bvc.prewarm() in setup_fnc so the first call is filtered from its first frame. The LiveKit page walks through both install paths.

from livekit.agents import Agent, AgentServer, AgentSession, JobContext, JobProcess, cli, room_io
from livekit.plugins import murf_bvc
server = AgentServer()
def prewarm(proc: JobProcess):
murf_bvc.prewarm()
server.setup_fnc = prewarm
@server.rtc_session()
async def entrypoint(ctx: JobContext):
session = AgentSession(...) # your STT, LLM, and TTS
await session.start(
agent=Agent(instructions="You are a helpful assistant."),
room=ctx.room,
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(noise_cancellation=murf_bvc.BVC()),
),
)
if __name__ == "__main__":
cli.run_app(server)

The plugin requests leases from https://api.murf.ai. Pass license_url to prewarm() and BVC(), or set MURF_BVC_LICENSE_URL, to use another Murf environment.

How the license lease works

  • Each lease is valid for 60 minutes. The service refuses to issue one longer than 24 hours.
  • The plugin renews every 15 minutes and reports the minutes processed on each renewal.
  • If Murf cannot be reached, processing continues for at least 45 more minutes on the current lease. After that, audio passes through unprocessed until a renewal succeeds.
  • A revoked key stops working within an hour at most.
  • A refused key (HTTP 401, 402, or 403) is retried every 5 minutes. Audio passes through until a renewal succeeds.

Offline mode (on-premise)

Set MURF_BVC_LICENSE to an offline license (mbvc1...). The plugin checks the signature and expiry locally. It needs no network, which suits air-gapped deployments, and it takes precedence over MURF_API_KEY.

The Murf team issues offline licenses as part of on-premise deployment.

Options

Leave the defaults on in production.

OptionDefaultDescription
restoreTrueGives back anything the model removed while only the caller is talking, so the caller’s voice is not thinned. Set False for maximum removal, or to save that CPU.
normalizeTrueLevels quiet and loud callers before the model so both get the same quality.
noise_gateTrueIn very loud noise, fades to unprocessed audio when the spread between loud and quiet moments drops below 10 dB, and fades back above 14 dB. Set False to always remove other voices, or pass (off_db, on_db).
nativeTrueRuns inside LiveKit’s audio pipeline. Falls back to a Python processor on older livekit versions. Set False only when debugging.

Pricing

With Speech to Text, background voice cancellation is included with Finch and does not add a charge. Rates are on Pricing.

Standalone plugin pricing is on Pricing, or with sales for an enterprise agreement. Online mode reports the minutes processed on each lease renewal.