TTS-Spaces-Arena / test_tts_xtts.py
Pendrokar's picture
the test TTS python scripts
dee6d0d
raw
history blame
642 Bytes
import os
from gradio_client import Client, file
client = Client("coqui/xtts", hf_token=os.getenv('HF_TOKEN'))
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
'/static-proxy?url=https%3A%2F%2Fcdn-uploads.huggingface.co%2Fproduction%2Fuploads%2F63d52e0c4e5642795617f668%2FV6-rMmI-P59DA4leWDIcK.wav%26%23x27%3B%3C%2Fspan%3E%2C # voice sample
None, # mic voice sample
False, #use_mic
False, #cleanup_reference
False, #auto_detect
True, #ToS
fn_index=1
)