-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[MagpieTTS][TTS] Streaming Algorithm for MagpieTTS to 2508 #14573
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
Conversation
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.
Pull Request Overview
This PR adds streaming inference functionality to MagpieTTS, enabling real-time text-to-speech generation by processing text input incrementally rather than all at once. The streaming algorithm maintains sliding windows for both text and audio history while managing attention priors to ensure coherent audio generation across text chunks.
Key Changes:
- Implementation of streaming inference algorithm with windowing mechanisms for text and audio tokens
- Addition of specialized attention prior handling for streaming mode with exponential weight support
- Extraction of common argument parsing functionality to support both streaming and non-streaming inference scripts
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| scripts/magpietts/infer_and_evaluate_streaming.py | New streaming inference script with chunked text processing and windowed generation |
| nemo/collections/tts/models/magpietts.py | Core streaming methods including windowed text processing and streaming-specific attention prior construction |
| scripts/magpietts/infer_and_evaluate.py | Refactored to extract common argument parsing logic and removed combined violin plot functionality |
| scripts/magpietts/README.md | Added documentation and usage example for the new streaming inference capability |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Hi Subhankar, nice work! I have not dived into all the details but here are a few things that come to mind:
I know that there is a tradeoff between eliminating code duplication vs making unified code overly complex, but maybe the above are worth another look?
|
tests/functional_tests/L2_TTS_InferEvaluateStreaming_Magpietts_ZeroShot.sh
Show resolved
Hide resolved
Signed-off-by: subhankar-ghosh <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Add padding to text context tokens based on max duration. Signed-off-by: Subhankar Ghosh <[email protected]>
Signed-off-by: subhankar-ghosh <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Removed unused imports and variables from the script. Signed-off-by: Subhankar Ghosh <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Xuesong Yang <[email protected]>
Signed-off-by: Xuesong Yang <[email protected]>
Signed-off-by: Xuesong Yang <[email protected]>
Signed-off-by: XuesongYang <[email protected]>
Signed-off-by: Subhankar Ghosh <[email protected]>
Signed-off-by: subhankar-ghosh <[email protected]>
6ac6643 to
10d116d
Compare
Signed-off-by: Subhankar Ghosh <[email protected]>
|
[🤖]: Hi @subhankar-ghosh 👋, We wanted to let you know that a CICD pipeline for this PR just finished successfully. So it might be time to merge this PR or get some approvals. |
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Add streaming algorithm to magpietts
Collection: [Note which collection this PR will affect]
TTS
Usage
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information