Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions livekit-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ boson-avatar = ["livekit-plugins-boson-avatar>=1.8.11"]
browser = ["livekit-plugins-browser>=0.4.11"]
cambai = ["livekit-plugins-cambai>=1.8.11"]
cartesia = ["livekit-plugins-cartesia>=1.8.11"]
vartalaap = ["livekit-plugins-vartalaap>=1.8.11"]
cerebras = ["livekit-plugins-cerebras>=1.8.11"]
clova = ["livekit-plugins-clova>=1.8.11"]
deepgram = ["livekit-plugins-deepgram>=1.8.11"]
Expand Down
25 changes: 25 additions & 0 deletions livekit-plugins/livekit-plugins-vartalaap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Vartalaap plugin for LiveKit Agents

Support for [Vartalaap](https://vartalaap.si/)'s Hinglish and Indian-language text-to-speech in LiveKit Agents.

More information is available in the docs for the [TTS](https://docs.livekit.io/agents/integrations/tts/vartalaap/) integration and in the [Vartalaap API reference](https://docs.vartalaap.si).

## Installation

```bash
pip install livekit-plugins-vartalaap
```

## Pre-requisites

You'll need an API key from Vartalaap. It can be set as an environment variable: `VARTALAAP_API_KEY`

## Usage

```python
from livekit.plugins import vartalaap

tts = vartalaap.TTS(voice="saanvi", expression="neutral", digits="auto")
```

Every option (`voice`, `expression`, `digits`, `speed`, `temperature`, `seed`, `postfx`, `profile`, `raw`) can be changed mid-session with `tts.update_options(...)`; it applies from the next sentence without reconnecting.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Vartalaap plugin for LiveKit Agents

Hinglish and Indian-language text-to-speech over the Vartalaap API
(https://docs.vartalaap.si). See https://docs.livekit.io/agents/integrations/tts/ for
how TTS plugins fit into an AgentSession.
"""

from .tts import TTS, ChunkedStream, SynthesizeStream
from .version import __version__

__all__ = ["TTS", "ChunkedStream", "SynthesizeStream", "__version__"]

from livekit.agents import Plugin

from .log import logger


class VartalaapPlugin(Plugin):
def __init__(self) -> None:
super().__init__(__name__, __version__, __package__, logger)


Plugin.register_plugin(VartalaapPlugin())

# Cleanup docs of unexported modules
_module = dir()
NOT_IN_ALL = [m for m in _module if m not in __all__]

__pdoc__ = {}

for n in NOT_IN_ALL:
__pdoc__[n] = False
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import logging

logger = logging.getLogger("livekit.plugins.vartalaap")
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from typing import Literal

TTSModels = Literal["narad"]
"""The Vartalaap model family. ``narad`` is the current Hinglish / Indian-English model."""

TTSVoices = Literal[
"saanvi",
"sahil",
"meera",
"mahesh",
"ananya",
"arjun",
"kiara",
"kevin",
]
"""A few of the voice ids. ``GET /v1/voices`` on the API lists every voice of the key with its
language, gender and the expressions it carries; any id from that list is accepted."""

TTSExpressions = Literal["neutral", "excited", "sad", "whisper"]
"""Expression of the delivery (the API's ``style`` field). ``neutral`` sends nothing and plays the
voice as is. A voice without the requested expression plays neutral; an unknown name is a 400.
Newer models may add expressions; the value is passed through unchanged."""

TTSDigits = Literal["auto", "hi", "mixed", "en"]
"""How digits are read in Hinglish text: ``hi`` Hindi number words, ``mixed`` codes/OTPs/phones in
English digit names with amounts in Hindi, ``en`` English number words with Indian grouping,
``auto`` picks ``en`` when the text has Latin words and ``hi`` otherwise. English voices ignore it."""

TTSProfiles = Literal["default", "telephony"]
"""Output chain profile. ``telephony`` adds a 300 Hz high-pass, a presence lift and a de-esser tuned
for 8 kHz mu-law / PSTN delivery."""
Loading
Loading