{"id":2987,"library":"livekit-blingfire","title":"LiveKit BlingFire Bindings","description":"livekit-blingfire provides Python bindings for the BlingFire text processing library, specifically designed to integrate with livekit-agents. It offers efficient sentence splitting and tokenization capabilities, typically used to enhance the text processing pipeline within LiveKit's AI agents. The library is part of the broader LiveKit Agents ecosystem and sees releases that often align with major livekit-agents updates, ensuring compatibility and leveraging new features.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/livekit/agents/tree/main/plugins/livekit-plugins-blingfire","tags":["livekit","audio","nlp","text-processing","blingfire","agents","plugin"],"install":[{"cmd":"pip install livekit-blingfire","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Provides the core agent framework that this plugin integrates with.","package":"livekit-agents","optional":false},{"reason":"The underlying high-performance text processing library for tokenization and sentence splitting.","package":"blingfire","optional":false}],"imports":[{"note":"Used for setting the default LLM sentence splitter for livekit-agents.","symbol":"BlingFireSentenceSplitter","correct":"from livekit.plugins.blingfire import BlingFireSentenceSplitter"},{"note":"Provides a tokenizer compatible with BlingFire.","symbol":"BlingFireTokenizer","correct":"from livekit.plugins.blingfire import BlingFireTokenizer"}],"quickstart":{"code":"from livekit.plugins.blingfire import BlingFireSentenceSplitter\nfrom livekit.agents import llm\n\n# Set BlingFire as the default sentence splitter for LLM operations\nllm.sentence_splitter.set_splitter(BlingFireSentenceSplitter())\n\n# Example usage of the splitter (typically used internally by agents)\ntext = \"Hello, world! How are you doing? This is a test.\"\nsplitter = llm.sentence_splitter.get_splitter()\nsentences = splitter.split(text)\n\nfor s in sentences:\n    print(f\"- {s}\")","lang":"python","description":"This quickstart demonstrates how to configure `livekit-agents` to use `BlingFireSentenceSplitter` as its default sentence splitter for LLM-related text processing. Once set, any `livekit.agents.llm` components that rely on sentence splitting will automatically use BlingFire."},"warnings":[{"fix":"Ensure your environment has necessary build tools (e.g., `build-essential` on Debian/Ubuntu, Xcode on macOS) if wheel installation fails.","message":"BlingFire, the underlying library, has native components. While `livekit-blingfire` typically distributes pre-compiled wheels for common platforms, installing on less common architectures or Python versions might require a C++ compiler and associated build tools for the `blingfire` dependency.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For complex scenarios with multiple agents/plugins, consider designing your agents to explicitly pass splitter instances where needed, or manage separate processes for agents requiring distinct configurations.","message":"The `llm.sentence_splitter.set_splitter()` method globally configures the sentence splitter for all `livekit.agents.llm` operations within the current process. If you are running multiple agents or plugins that require different sentence splitting behaviors, this global setting could lead to unexpected interactions or race conditions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install `livekit-blingfire` alongside a compatible version of `livekit-agents`. Use `pip install livekit-blingfire` to ensure dependencies are resolved correctly, or consult the `livekit-blingfire` `pyproject.toml` for the exact `livekit-agents` version range.","message":"Compatibility with `livekit-agents` versions is crucial. `livekit-blingfire` specifies `livekit-agents (>=1.0.0,<2.0.0)`. Installing incompatible versions of `livekit-agents` can lead to runtime errors or unexpected behavior due to API changes.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}