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

Support Rime TTS #1206

Closed
wants to merge 5 commits into from
Closed

Conversation

patrickscoleman
Copy link
Contributor

@patrickscoleman patrickscoleman commented Dec 10, 2024

What

This PR implements Rime support for TTS

Why

Feature Improvement

Docs

https://rimelabs.mintlify.app/api-reference/quickstart

Copy link

changeset-bot bot commented Dec 10, 2024

⚠️ No Changeset found

Latest commit: bae9e35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Dec 10, 2024

CLA assistant check
All committers have signed the CLA.

@patrickscoleman
Copy link
Contributor Author

I removed the unused typing.Any import but wasn't clear how to fix this CI error
image

@davidzhao
Copy link
Member

@patrickscoleman could you give me access to the forked repo? I'd like to clean up a couple of things and get this across the finish line.

@patrickscoleman
Copy link
Contributor Author

No problem, thank you! Just gave you access to: https://github.com/patrickscoleman/livekit-agents-add-rime

@liliest
Copy link

liliest commented Jan 2, 2025

@davidzhao Hey David! Just following up here. let us know if you need anything from our side to get this over the finish line!

@jayeshp19
Copy link
Collaborator

Hi @patrickscoleman @liliest,
I'm trying to test a basic example from the docs for review, but I'm getting a 401 error with an "Invalid API Key" message. This is happening on my newly created account.

from .log import logger
from .models import TTSModels, TTSEncoding

_Encoding = Literal["pcm", "mp3", "x-mulaw"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is it diffrent from TTSEncoding ?

"mulaw": "audio/x-mulaw",
}

def _sampling_rate_from_format(output_format: TTSEncoding) -> int | None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

modelId: TTSModels | str = DEFAULT_MODEL_ID,
speaker: str = DEFAULT_SPEAKER,
audioFormat: TTSEncoding | _Encoding = "wav",
samplingRate: int | None = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's rename this to sample_rate to keep consistency with other tts plugins

url = self._opts.api_url
headers = {
"accept": ACCEPT_HEADER[self._opts.audioFormat],
AUTHORIZATION_HEADER: f"Bearer {self._opts.api_key}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Authorization"

@liliest
Copy link

liliest commented Jan 15, 2025

Hi @patrickscoleman @liliest, I'm trying to test a basic example from the docs for review, but I'm getting a 401 error with an "Invalid API Key" message. This is happening on my newly created account.

hi @jayeshp19 ! can you sign up for our 'free trial' plan and then try again? thanks so much for looking at this!

@jayeshp19
Copy link
Collaborator

Oh we manually have to subscribe, I thought I was subscribed for free plan already when I made an account. Checking now!

@liliest
Copy link

liliest commented Jan 15, 2025

@jayeshp19 apologies, our flow is bad and currently being reworked :)

@jayeshp19
Copy link
Collaborator

Moved these changese to #1377 with some cleanup

@jayeshp19
Copy link
Collaborator

Closing this since #1377 has been merged into the main branch.

@jayeshp19 jayeshp19 closed this Jan 16, 2025
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.

5 participants