Skip to content

Add mistv3 model support to Rime TTS services#4223

Open
mcullan wants to merge 4 commits into
pipecat-ai:mainfrom
rimelabs:rime/mistv3-support-2
Open

Add mistv3 model support to Rime TTS services#4223
mcullan wants to merge 4 commits into
pipecat-ai:mainfrom
rimelabs:rime/mistv3-support-2

Conversation

@mcullan
Copy link
Copy Markdown

@mcullan mcullan commented Apr 1, 2026

Adds mistv3 as a supported model in RimeTTSService and RimeHttpTTSService.

mistv3 supports speedAlpha,inlineSpeedAlpha, pauseBetweenBrackets, and phonemizeBetweenBrackets.

reduceLatency, noTextNormalization, and saveOovs are mistv2-only and are excluded.

mistv3 shares most params with mistv2 but does not support reduceLatency
or phonemizeBetweenBrackets. Adds an explicit elif branch for mistv3 in
_build_ws_params (RimeTTSService) and guards reduceLatency/phonemizeBetweenBrackets
behind a mistv2 check in RimeHttpTTSService.
@mcullan mcullan force-pushed the rime/mistv3-support-2 branch from cdd98de to 248f5c8 Compare April 1, 2026 18:31
@markbackman
Copy link
Copy Markdown
Contributor

markbackman commented Apr 1, 2026

Please add a changelog entry. See CONTRIBUTING.md for details:
https://github.com/pipecat-ai/pipecat/blob/main/CONTRIBUTING.md

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/rime/tts.py 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/services/rime/tts.py 32.38% <0.00%> (-0.14%) ⬇️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mcullan
Copy link
Copy Markdown
Author

mcullan commented Apr 2, 2026

@markbackman changelog entry added!

@markbackman
Copy link
Copy Markdown
Contributor

Is this ready for review?

@markbackman
Copy link
Copy Markdown
Contributor

Based on the code, the PR description is out of date. Is that right?

@mcullan
Copy link
Copy Markdown
Author

mcullan commented Apr 2, 2026

@markbackman apologies for the discrepancy/changes there -- we ended up landing more features for Mist v3 than expected yesterday. With the latest commit and the update to the description, this is now 100% ready for review and the description is accurate to the code.

Copy link
Copy Markdown
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

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

Nice addition — just two items to address.

if self._settings.pauseBetweenBrackets is not None:
params["pauseBetweenBrackets"] = json.dumps(self._settings.pauseBetweenBrackets)
if self._settings.phonemizeBetweenBrackets is not None:
params["phonemizeBetweenBrackets"] = json.dumps(self._settings.phonemizeBetweenBrackets)
Copy link
Copy Markdown
Contributor

@markbackman markbackman Apr 2, 2026

Choose a reason for hiding this comment

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

This line is 101 characters — will fail the ruff 100-char limit.

Can you run uv run scripts/fix-ruff.sh or install the pre-commit hook (uv run pre-commit install)?

params["temperature"] = self._settings.temperature
if self._settings.top_p is not None:
params["top_p"] = self._settings.top_p
elif self._settings.model == "mistv3":
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.

Suggestion: consider restructuring to avoid duplicating pauseBetweenBrackets and phonemizeBetweenBrackets handling (same logic exists in the else branch). Something like:

if self._settings.model == "arcana":
    # arcana-only params
    ...
else:
    # shared mist/mistv2/mistv3 params
    if self._settings.pauseBetweenBrackets is not None:
        params["pauseBetweenBrackets"] = json.dumps(self._settings.pauseBetweenBrackets)
    if self._settings.phonemizeBetweenBrackets is not None:
        params["phonemizeBetweenBrackets"] = json.dumps(
            self._settings.phonemizeBetweenBrackets
        )

    if self._settings.model == "mistv3":
        if self._settings.inlineSpeedAlpha is not None:
            params["inlineSpeedAlpha"] = self._settings.inlineSpeedAlpha
    else:  # mist/mistv2
        if self._settings.reduceLatency is not None:
            params["reduceLatency"] = self._settings.reduceLatency
        ...

This way the shared params are written once, reducing the chance of them drifting apart.

Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

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

The docstring update on line ~77 correctly notes that speedAlpha now supports mist, mistv2, mistv3, but the new elif self._settings.model == "mistv3": block in _build_ws_params() omits speedAlpha entirely—only pauseBetweenBrackets, phonemizeBetweenBrackets, and inlineSpeedAlpha are added. If speedAlpha is genuinely supported by mistv3, it needs to be wired up in that block; if not, the docstring update is incorrect and should remain mistv2 only. Conversely, inlineSpeedAlpha is included in the mistv3 block but its docstring doesn't mention mistv3 support, so the documentation is inconsistent in both directions. It's also worth double-checking whether reduceLatency, noTextNormalization, and saveOovs truly remain mistv2-only or if mistv3 picks up any of those as well, since leaving them in the else branch means they'd silently be sent for mistv2 but not mistv3.

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.

4 participants