Plachtaa / VALL-E-X

An open source implementation of Microsoft's VALL-E X zero-shot TTS model. Demo is available in https://plachtaa.github.io/vallex/
MIT License
7.7k stars 765 forks source link

求一个Gradio的那个Use via API中没有的python示例 #81

Open sunianOvO opened 1 year ago

sunianOvO commented 1 year ago

使用 打包好的prompt包生成音频应该怎么给参数,其他都是默认内容 `from gradio_client import Client

client = Client("https://plachta-vall-e-x.hf.space/") result = client.predict( "Howdy!", # str in 'Text' Textbox component "auto-detect", # str (Option from: ['auto-detect', 'English', '中文', '日本語']) in 'language' Dropdown component "no-accent", # str (Option from: ['no-accent', 'English', '中文', '日本語']) in 'accent' Dropdown component "https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav", # str (filepath or URL to file) in 'uploaded audio prompt' Audio component "https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav", # str (filepath or URL to file) in 'recorded audio prompt' Audio component "Howdy!", # str in 'Transcript' Textbox component fn_index=0 ) print(result)`

方便的话再给个curl?

Plachtaa commented 1 year ago

I apologize that I'm not familiar with the usage of Gradio Client API. Please figure it our yourself.

dizhenx commented 11 months ago

使用 打包好的prompt包生成音频应该怎么给参数,其他都是默认内容 `from gradio_client import Client

client = Client("https://plachta-vall-e-x.hf.space/") result = client.predict( "Howdy!", # str in 'Text' Textbox component "auto-detect", # str (Option from: ['auto-detect', 'English', '中文', '日本語']) in 'language' Dropdown component "no-accent", # str (Option from: ['no-accent', 'English', '中文', '日本語']) in 'accent' Dropdown component "https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav", # str (filepath or URL to file) in 'uploaded audio prompt' Audio component "https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav", # str (filepath or URL to file) in 'recorded audio prompt' Audio component "Howdy!", # str in 'Transcript' Textbox component fn_index=0 ) print(result)`

方便的话再给个curl?

这个最终搞定没?运行报错AttributeError: 'Response' object has no attribute 'is_success'