Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,085 Bytes
48cef3d 51adc6d 48cef3d |
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("OuteAI/OuteTTS-0.2-500M-Demo", hf_token=os.getenv('HF_TOKEN'))
client = Client("ameerazam08/OuteTTS-0.2-500M-Demo", 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="Please surprise me and speak in whatever voice you enjoy.",
temperature=0.1,
repetition_penalty=1.1,
language="en",
speaker_selection=None,
reference_audio=handle_file('voice_samples/EN_B00004_S00051_W000213.mp3'),
reference_text='Our model manager is Graham, whom we observed leading a small team of chemical engineers within a multinational European firm we\'ll call Kruger Bern.',
# reference_audio=None,
# reference_text=None,
# reference_audio=handle_file('EN_B00004_S00051_W000213.wav'),
# reference_text="Our model manager is Graham, whom we observed leading a small team of chemical engineers within a multinational European firm we'll call",
api_name="/generate_tts"
)
print(result) |