Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RimeTTSService #1163

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add RimeTTSService #1163

wants to merge 5 commits into from

Conversation

markbackman
Copy link
Contributor

Please describe the changes in your PR. If it is addressing an issue, please reference that as well.

In progress. Waiting to resolve a few things related to word/timestamp alignment.

@markbackman
Copy link
Contributor Author

@aconchillo good feedback! I updated those points.

I'm seeing an issue with the word timings. I think the timings are faster than the audio stream which results in: 1) incorrectly timed onTtsText callbacks (for RTVI), 2) not getting the complete text into the LLM context. I reached out to Rime to see if this is an issue that they're aware of. For now, I'll leave this as a draft.

self._started = False
self._context_id = None

def _calculate_word_times(self, words: list, starts: list, ends: list) -> list:
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels like the ends list is included as a function argument, but it is never actually used in the function logic. Do we need it here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do need to pass ends for the zip iteration, but don't need it in the loop. So, I'm updating to make that clear.

Copy link
Contributor

@filipi87 filipi87 left a comment

Choose a reason for hiding this comment

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

I left a comment about one possible improvement, but everything looks good.

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 172 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/rime.py 0.00% 172 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/services/rime.py 0.00% <0.00%> (ø)

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.

3 participants