Skip to content

feat(smallestai): add word_timestamps support to TTS#5921

Open
harshitajain165 wants to merge 1 commit into
livekit:mainfrom
harshitajain165:harshita/smallest-tts-word-timestamps
Open

feat(smallestai): add word_timestamps support to TTS#5921
harshitajain165 wants to merge 1 commit into
livekit:mainfrom
harshitajain165:harshita/smallest-tts-word-timestamps

Conversation

@harshitajain165
Copy link
Copy Markdown
Contributor

Summary

Adds word_timestamps opt-in flag to the Smallest AI TTS plugin, matching the feature shipped in Lightning v3.1 and v3.1 Pro on 2026-06-01.

Changes

  • Added word_timestamps: bool to _TTSOptions dataclass
  • Added word_timestamps: bool = False parameter to TTS.__init__
  • Added word_timestamps to update_options
  • In SynthesizeStream._run_ws: includes word_timestamps: true in the WebSocket payload when enabled, and handles the new word_timestamp status frame

Usage

tts = smallestai.TTS(
    model="lightning_v3.1_pro",
    voice_id="meher",
    word_timestamps=True,
)

When enabled, the server interleaves status: "word_timestamp" frames with audio chunks. Each frame carries data: { id, word, start, end } where start/end are floats in seconds relative to the start of the audio stream.

Supported voices: base-queue English + Hindi voices (meher, devansh, kartik, maithili, liam, avery). Other voice families silently emit no word events — audio works normally.

Defaults to False — purely opt-in, no behavior change for existing integrations.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant