Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,083 Bytes
dee6d0d fbe6a51 dee6d0d fbe6a51 dee6d0d fbe6a51 dee6d0d fbe6a51 dee6d0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import os
from gradio_client import Client, handle_file
# client = Client("coqui/xtts", hf_token=os.getenv('HF_TOKEN'), headers={})
client = Client("tonyassi/voice-clone", hf_token=os.getenv('HF_TOKEN'), headers={})
endpoints = client.view_api(all_endpoints=True, print_info=False, return_format='dict')
# print(endpoints)
# result = client.predict(
# "Quick test.", # str in 'What should I say!? (max 512 characters).' Textbox component
# 'en', #lang
# 'https://cdn-uploads.huggingface.co/production/uploads/63d52e0c4e5642795617f668/V6-rMmI-P59DA4leWDIcK.wav', # voice sample
# None, # mic voice sample
# False, #use_mic
# False, #cleanup_reference
# False, #auto_detect
# True, #ToS
# fn_index=1
# )
# tony's space
result = client.predict(
text="Quick test.", # str in 'What should I say!? (max 512 characters).' Textbox component
audio=handle_file('https://cdn-uploads.huggingface.co/production/uploads/63d52e0c4e5642795617f668/V6-rMmI-P59DA4leWDIcK.wav'), # voice sample
api_name="/predict"
) |