Feature Addition: Set Default Speaker from Filepath or URI in Pipeline #128
signalprime
started this conversation in
Ideas
Replies: 2 comments
-
@jpc would this be alright with you? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yup, that sounds like a great idea. I you could submit the PR I'll be happy to merge it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to ask about creating a small PR for adding a function to the
Pipeline
class which allows users to set a default speaker prior to generation. It could streamlines the process of generating audio with a consistent speaker voice by eliminating the need to repeatedly extract speaker embeddings for each generation task.I updated pipeline.py on my fork and would apply the changes to
/nbs/7. Pipeline.ipynb
if this suggestion is acceptable. I also updated pipeline.py with docstrings and can make a separate PR to present docstrings for the full codebase if it will be helpful.Background
Frequently generating audio with the same cloned speaker voice in various applications can lead to inefficiencies due to the repeated extraction of speaker embeddings. This update addresses this issue by allowing a filepath or URI pointing to an audio sample of the desired speaker voice to be set as the default. This change significantly improves performance and user experience by reducing redundant computations.
Implementation
The method
set_default_speaker
has been introduced, permitting the specification of a local filepath or remote URI that links to an audio file. This file should contain speech from the voice intended to be cloned for text-to-speech generations. Once set, this speaker's embeddings are extracted and used as the default for all subsequent audio generation tasks, thereby optimizing the process.Usage
To set the default speaker, pass a filepath or URI as the argument:
Beta Was this translation helpful? Give feedback.
All reactions