Skip to content

Add Qwen 3 TTS support for Simplismart-livekit plugin#5474

Open
simplipratik wants to merge 1 commit intolivekit:mainfrom
simplipratik:integration/qwen3-tts
Open

Add Qwen 3 TTS support for Simplismart-livekit plugin#5474
simplipratik wants to merge 1 commit intolivekit:mainfrom
simplipratik:integration/qwen3-tts

Conversation

@simplipratik
Copy link
Copy Markdown
Contributor

@simplipratik simplipratik commented Apr 17, 2026

Summary

This PR adds Qwen 3 TTS support to the SimpliSmart LiveKit plugin while maintaining full backwards compatibility with the existing Orpheus TTS implementation.

Changes

  • Added qwen-tts to TTSModels in models.py
  • Created QwenTTSOptions class for Qwen 3 specific configuration (language, leading_silence)
  • Updated TTS class to accept an options parameter that can be either SimplismartTTSOptions or QwenTTSOptions
  • Updated ChunkedStream._run() to use type-based payload construction for the appropriate API format
  • Added comprehensive error handling and logging (consistent with stt.py patterns)
  • Exported QwenTTSOptions and SimplismartTTSOptions from the module

Usage

Legacy Orpheus (backwards compatible)

from livekit.plugins.simplismart import TTS

tts = TTS()  # Uses default Orpheus model
tts = TTS(model="canopylabs/orpheus-3b-0.1-ft", voice="tara")

Qwen 3 TTS

from livekit.plugins.simplismart import TTS, QwenTTSOptions

tts = TTS(
    model="qwen-tts",
    voice="Chelsie",
    base_url="https://api.simplismart.live/v1/audio/speech",
    options=QwenTTSOptions(language="English", leading_silence=True)
)

Files Changed

  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/__init__.py
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/models.py
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/tts.py

devin-ai-integration[bot]

This comment was marked as resolved.

@simplipratik simplipratik force-pushed the integration/qwen3-tts branch from bb5f99b to e2ff8c2 Compare April 17, 2026 13:33
@simplipratik simplipratik force-pushed the integration/qwen3-tts branch from e2ff8c2 to 0228713 Compare April 17, 2026 13:38
@simplipratik simplipratik changed the title Add Qwen 3 TTS support with backwards compatibility Add Qwen 3 TTS support for Simplismart-livekit plugin Apr 17, 2026
voice: str | None = None,
api_key: str | None = None,
http_session: aiohttp.ClientSession | None = None,
temperature: float = 0.7,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Getting rid of these four will break existing users, it's a breaking change.

if options is None:
self._opts = SimplismartTTSOptions()
is_qwen = False
elif isinstance(options, QwenTTSOptions):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Setting model="qwen-tts" or base_url=QWEN_BASE_URL without options=QwenTTSOptions(...) sends Orpheus-format JSON to the Qwen endpoint. Is there a better way we can approach the is_qwen check?

top_p: float = 0.9,
repetition_penalty: float = 1.5,
max_tokens: int = 1000,
sample_rate: int = 24000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sample_rate is configurable, but is sent to the server in neither Qwen nor Orpheus mode, is this intentional?

"Content-Type": "application/json",
}

logger.info(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this and the other 6 logger.info's should be logger.debug's, otherwise this will be very noisy, and out of line with the way the other plugins log.

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.

2 participants