Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,11 @@ client = Client("ResembleAI/Chatterbox", hf_token)
|
|
10 |
|
11 |
# Define the function to call the model and return the generated audio file
|
12 |
def generate_tts_audio(text_input, audio_prompt_url, exaggeration_input, temperature_input, seed_num_input, cfgw_input):
|
|
|
|
|
|
|
|
|
|
|
13 |
try:
|
14 |
result = client.predict(
|
15 |
text_input=text_input,
|
|
|
10 |
|
11 |
# Define the function to call the model and return the generated audio file
|
12 |
def generate_tts_audio(text_input, audio_prompt_url, exaggeration_input, temperature_input, seed_num_input, cfgw_input):
|
13 |
+
print("sending request")
|
14 |
+
if audio_prompt_url.strip():
|
15 |
+
audio_prompt = handle_file(audio_prompt_url)
|
16 |
+
else:
|
17 |
+
audio_prompt = None
|
18 |
try:
|
19 |
result = client.predict(
|
20 |
text_input=text_input,
|