Skip to main content

Livekit Murf

Murf AI Logo

Murf AI text-to-speech and speech-to-text for Livekit Agents.

Note: This integration is maintained by Murf AI.

Use this package for both speech and transcription. murf.TTS follows the same Murf requests as LiveKit's Murf TTS plugin: Falcon by default, api-key header, and the same voice, style, speed, pitch, and locale fields. Do not install livekit-plugins-murf in the same environment. Both packages provide livekit.plugins.murf, and the later install replaces the other.

Installation

pip install livekit-murf

TTS and STT only (pure Python). For background voice cancellation on the agent's audio input:

pip install "livekit-murf[bvc]"

That pulls the platform-specific livekit-plugins-murf-bvc wheel (native libmurf_bvc for your OS/arch). Pip downloads only that platform's wheel.

from livekit.plugins import murf

session = AgentSession(
    stt=murf.STT(model="finch_indic_1.0", language="hi,te"),
    tts=murf.TTS(voice="Pooja", style="Conversational", model="FALCON"),
)

Background voice cancellation (optional)

Requires pip install "livekit-murf[bvc]", a Murf API key with BVC enabled (MURF_API_KEY), and Linux (glibc 2.28+) or macOS.

from livekit.agents import Agent, AgentServer, AgentSession, JobContext, JobProcess, cli, room_io
from livekit.plugins import murf, 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(
        stt=murf.STT(model="finch_global_1.0"),
        tts=murf.TTS(voice="Natalie", style="Conversational", model="FALCON"),
    )
    await session.start(
        room=ctx.room,
        agent=Agent(instructions="You are a helpful assistant."),
        room_options=room_io.RoomOptions(
            audio_input=room_io.AudioInputOptions(noise_cancellation=murf_bvc.BVC()),
        ),
    )

if __name__ == "__main__":
    cli.run_app(server)

Livekit Starter Project

from livekit.agents import JobContext, WorkerOptions, cli, JobProcess, get_job_context
from livekit.agents.voice import Agent, AgentSession
from livekit.plugins import murf, openai, silero

class MyAgent(Agent):
    def __init__(self) -> None:
        super().__init__(
            instructions="You are a voice agent build using Murf",
            stt=murf.STT(model="finch_indic_1.0", language="hi,te"),
            llm=openai.LLM(model="gpt-4o"),
            tts=murf.TTS(voice="Pooja", style="Conversational", model="FALCON"),
            vad=get_job_context().proc.userdata["vad"],
        )

    async def on_enter(self):
        await self.session.say("Hi, I am a voice agent powered by Murf, how can I help you?")



async def entrypoint(ctx: JobContext):
    await ctx.connect()
    ctx.log_context_fields = {
        "room": ctx.room.name,
    }

    session = AgentSession()

    await session.start(
        agent=MyAgent(),
        room=ctx.room
    )


def prewarm(proc: JobProcess):
    proc.userdata["vad"] = silero.VAD.load()


if __name__ == "__main__":
    cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, prewarm_fnc=prewarm))

Speech to Text

murf.STT streams PCM audio to Murf's streaming transcription WebSocket. Partials are interim transcripts. Murf sends a final when the caller pauses. LiveKit's turn detection decides when the agent replies.

stt = murf.STT(model="finch_indic_1.0", language="hi,te")

Parameters

  • model (optional) — Default: finch_global_1.0. finch_global_1.0 (us-east.api.murf.ai) transcribes English and European languages. finch_indic_1.0 (in.api.murf.ai) transcribes English (India) and Indic languages.
  • language (optional) — Default: auto, which detects among the languages of the connected model. A comma-separated string or a list of codes, such as "hi,te" or ["hi", "te"], detects only from those languages. BCP-47 tags such as en-US or hi-IN are mapped to Murf's codes.
  • sample_rate (optional) — Default: 16000. Incoming audio is resampled to this rate. One of 8000, 12000, 16000, 24000, 32000, 44100, or 48000.
  • keywords (optional) — Words or phrases to boost. Sent as Murf's comma-separated keywords query parameter.
  • alpha (optional) — Default: 0.5. How strongly to favour keywords, from 0.0 to 1.0.
  • text_formatting (optional) — Default: False. Format numbers and similar terms. Applies to Hindi and English (India) only.
  • bvc (optional) — Default: False. Remove background voices before transcription.

The API key is read from MURF_API_KEY when api_key is omitted.

Text to Speech

murf.TTS synthesizes speech with Murf. It uses the same request fields as LiveKit's Murf TTS plugin. Audio streams over a WebSocket. Set streaming=False to synthesize over HTTP instead.

tts = murf.TTS(
    voice="Pooja",
    style="Conversational",
    model="FALCON",
)

Parameters

  • model (optional) — Default: FALCON. Murf TTS model. Valid values are FALCON and GEN2.
  • voice (optional) — Default: Gordon. Voice ID from Murf's voice library.
  • style (optional) — Default: Conversation. Voice style, for example Conversational, Narration, or Promo. See the voice library for the styles each voice supports.
  • locale (optional) — Locale for synthesis, for example en-US or hi-IN. When omitted, the locale is inferred from the voice.
  • speed (optional) — Speech speed. Positive values are faster and negative values are slower. Valid range: -50 to 50.
  • pitch (optional) — Speech pitch. Positive values are higher and negative values are lower. Valid range: -50 to 50.

sample_rate defaults to 24000 and encoding defaults to pcm. The API key is read from MURF_API_KEY when api_key is omitted. update_options() changes locale, voice, style, speed, and pitch for later audio.

Pre-requisites

You'll need an API key from Murf AI. It can be set as an environment variable: MURF_API_KEY

Compatibility: Requires livekit-agents >= 1.5.2.

Metadata

Release files for livekit-murf 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-murf 0.2.1
File Size Uploaded Provenance Actions
livekit_murf-0.2.1.tar.gz 20.4 kB Without provenance Details for livekit_murf-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-murf 0.2.1
File Interpreter ABI Platform Actions
livekit_murf-0.2.1-py3-none-any.whl Python 3 none any Details for livekit_murf-0.2.1-py3-none-any.whl

Total release size: 41.3 kB

Release files / livekit_murf-0.2.1.tar.gz

Download URL livekit_murf-0.2.1.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1b896fbd8d5195ea413534255186a010bca22168b7456523e1fd4a2138932cbd
BLAKE2b-256 checksum
How to use checksums
b4bf855c85c8667808511b2e6a125f2221f030d054112ac80b08c89117f2c5d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / livekit_murf-0.2.1-py3-none-any.whl

Download URL livekit_murf-0.2.1-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62aaac091e8f0a44d894a4e0fd2a15da3feb6ecf3598e405e90e89da8fd47172
BLAKE2b-256 checksum
How to use checksums
1c87429880b41c390e8cb78d4a83d5f6e0203fbcb98f52827c361a4458c9bcc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for livekit-murf 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page