-
Notifications
You must be signed in to change notification settings - Fork 477
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
ENH: cosyvoice support pt file #2431
base: main
Are you sure you want to change the base?
ENH: cosyvoice support pt file #2431
Conversation
Is this PR ready for review? |
yes 😄 |
Can you add some doc to
to tell users how to leverage this feature? |
committed |
Please fix the GPU CI: https://github.com/xorbitsai/inference/actions/runs/11323214004/job/31485465795?pr=2431. It would be good to add a CI case for the .pt file as well. |
for i in self.frontend.text_normalize(tts_text, split=True): | ||
model_input = self.frontend.frontend_sft(i, spk_id) | ||
if newspk is not None: |
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.
Is it possible that the newspk
is not defined? e.g. the if
condition above is not true.
@@ -49,8 +53,29 @@ def list_avaliable_spks(self): | |||
return spks | |||
|
|||
def inference_sft(self, tts_text, spk_id, stream=False): | |||
if spk_id not in self.default_voices and os.environ["COSYVOICE_PT_PATH"] is not None: |
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.
The os.environ["COSYVOICE_PT_PATH"]
may raise a KeyError when spk_id not in self.default_voices. Is this expected?
Any update? |
If you need to use a custom .pt file, please set the folder path of the .pt file in the environment variable
COSYVOICE_PT_PATH
beforehand.如果需要使用自定义pt文件,请先在环境变量
COSYVOICE_PT_PATH
中设置pt文件所在的文件夹路径