#7508·agents

Sentence tokenizers don't split on ؟ ۔ । ॥, so TTS for Arabic, Urdu, Hindi and Bengali starts late

Author: ahmad65saadCreated Sep 28, 2026Updated Sep 28, 2026

Bug Description

The streaming sentence tokenizer decides when text is handed to TTS. For some scripts it doesn't recognise the sentence terminator, so the first sentence is held back until most (or all) of the LLM response has arrived.

  • tokenize.blingfire (the default in Agent.tts_node and tts.StreamAdapter) doesn't split on the danda । or double danda ॥, used by Hindi, Bengali, Marathi, Nepali and others.
  • tokenize.basic doesn't split on the Arabic question mark ؟, the Urdu full stop ۔, or ।/॥. The Sarvam TTS plugin (Indian languages) uses basic.SentenceTokenizer by default, as does the Vakyam plugin when blingfire isn't available.

Measured by streaming a four-sentence reply word by word into tokenizer.stream() and noting when the first sentence comes out:

tokenizer language first sentence released after
blingfire English word 7 / 24
blingfire Hindi word 25 / 28
blingfire Bengali word 21 / 24
basic Arabic (questions) word 18 / 18 (never splits)
basic Urdu word 33 / 33 (never splits)

Expected Behavior

These terminators end a sentence the way . ? 。 ? already do, so the first sentence reaches TTS just as early as in English.

Reproduction Steps

python
from livekit.agents.tokenize import basic, blingfire

blingfire.SentenceTokenizer(min_sentence_len=1).tokenize("आप कैसे हैं। मैं ठीक हूँ। धन्यवाद")
# ['आप कैसे हैं। मैं ठीक हूँ। धन्यवाद']
basic.SentenceTokenizer(min_sentence_len=1).tokenize("هل تريد الحجز؟ لدينا مواعيد متاحة.")
# ['هل تريد الحجز؟ لدينا مواعيد متاحة.']

Operating System

macOS 26.5 (the behaviour is platform-independent)

Models Used

Any TTS; Sarvam uses the basic tokenizer by default.

Package Versions

livekit-agents 1.8.3 (main @ 57b3227), livekit-blingfire 1.1.0

Proposed Solution

  • basic: add ؟ ۔ । ॥ to the end-of-sentence character class in _basic_sent.py, next to the existing CJK 。!?.
  • blingfire: in _split_sentences, also end a sentence after ।/॥ when it's followed by whitespace, merged with blingfire's own boundaries (blingfire already handles ؟ and ۔).

I have a fix with tests ready and will open a PR.