Spaces:
Running
on
Zero
Running
on
Zero
File size: 668 Bytes
bf13dc3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import os
from gradio_client import Client, file
client = Client("hexgrad/kokoro", hf_token=os.getenv('HF_TOKEN'))
# endpoints = client.view_api(all_endpoints=True, print_info=False, return_format='dict')
# print(endpoints)
result = client.predict(
text='"I hate it when people lie to me."',
voice="af",
ps=None,
speed=1,
trim=0,
use_gpu=False,
# *[
# "Oh, hello there!!",
# "af", #voice
# None, #ps
# 1, #speed
# 3000, #trim
# False, #use_gpu; fast enough with multithreaded with CPU
# ],
api_name="/generate"
)
print(result)
# text="Oh, hello there!!",
# voice="af",
# ps=None,
# speed=1,
# trim=3000,
# use_gpu=False, |