-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Cartesia] Use up-to-date opts in _sentence_stream_task #3500
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
Open
seanmuirhead
wants to merge
1
commit into
livekit:main
Choose a base branch
from
seanmuirhead:sean/use_updated_tts_opts_for_cartesia_stream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you explain in what case you want to update the options after the
tts_nodestarted?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Series of Events:
llm_node_1starts, callsupdate_options(voice=KATIE)tts_node_1starts withvoice=KATIEllm_node_1cancels, buttts_nodecontinuesllm_node_2starts, callsupdate_options(voice=MAX)tts_node_1synthesizes the LLM response, but in theKATIEvoice instead of theMAXvoiceDesired Behavior:
MAXvoice, not theKATIEvoicePlease let me know if this is reasonable and/or you plan to allow this functionality.
I think it is reasonable to expect the TTS to synthesize with the most up-to-date options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this actually happen? a new generation will create a new tts stream, ideally there should be a
tts_node_2for thellm_node_2.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps only one LLM node persists.
The behavior can be replicated, though, by doing something like this:
llm_node, callupdate_optionswith the new voice.If you make the change in this PR, the new voice will be reflected.
We need this by EOD, so will be hacking a version of the Cartesia.TTS() plugin in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it's not applied because the
tts_nodeis created in parallel withllm_node, before theupdate_optionsinllm_nodeis called.instead of using options from tts instance, we may still want each tts stream has a copy of the options. maybe we should allow to create a new
tts_nodein the llm_node with the updated options, this will fix the issue for all TTS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this. It makes sense for stream options to be immutable once instantiated.
What about a
tts_node.restart()ortts_node.refresh()of some sort? I can also create newtts_nodefrom within thellm_nodebut less clear how I would do that. Will take a look later this week