Add Qwen 3 TTS support for Simplismart-livekit plugin#5474
Open
simplipratik wants to merge 1 commit intolivekit:mainfrom
Open
Add Qwen 3 TTS support for Simplismart-livekit plugin#5474simplipratik wants to merge 1 commit intolivekit:mainfrom
simplipratik wants to merge 1 commit intolivekit:mainfrom
Conversation
bb5f99b to
e2ff8c2
Compare
Made-with: Cursor
e2ff8c2 to
0228713
Compare
u9g
reviewed
Apr 17, 2026
| voice: str | None = None, | ||
| api_key: str | None = None, | ||
| http_session: aiohttp.ClientSession | None = None, | ||
| temperature: float = 0.7, |
Contributor
There was a problem hiding this comment.
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): |
Contributor
There was a problem hiding this comment.
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, |
Contributor
There was a problem hiding this comment.
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( |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
qwen-ttstoTTSModelsinmodels.pyQwenTTSOptionsclass for Qwen 3 specific configuration (language,leading_silence)TTSclass to accept anoptionsparameter that can be eitherSimplismartTTSOptionsorQwenTTSOptionsChunkedStream._run()to use type-based payload construction for the appropriate API formatstt.pypatterns)QwenTTSOptionsandSimplismartTTSOptionsfrom the moduleUsage
Legacy Orpheus (backwards compatible)
Qwen 3 TTS
Files Changed
livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/__init__.pylivekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/models.pylivekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/tts.py