Spaces:
Sleeping
Sleeping
Update backend1.py
Browse files- backend1.py +1 -1
backend1.py
CHANGED
@@ -34,7 +34,7 @@ import httpx
|
|
34 |
client_1 = Client("ruslanmv/text-to-speech-fast", timeout=5)
|
35 |
client_2 = Client("ruslanmv/Text-To-Speech", timeout=5) # Set timeout to 5 seconds
|
36 |
client_3 = Client("ruslanmv/Text-to-Voice-Transformers", timeout=5)
|
37 |
-
clients = [client_1, client_2]
|
38 |
# Text-to-speech function with rate limiting, retry mechanism, and client rotation
|
39 |
def text_to_speech(text, retries=3, delay=5):
|
40 |
client_index = 0 # Start with the first client
|
|
|
34 |
client_1 = Client("ruslanmv/text-to-speech-fast", timeout=5)
|
35 |
client_2 = Client("ruslanmv/Text-To-Speech", timeout=5) # Set timeout to 5 seconds
|
36 |
client_3 = Client("ruslanmv/Text-to-Voice-Transformers", timeout=5)
|
37 |
+
clients = [client_1, client_3,client_2]
|
38 |
# Text-to-speech function with rate limiting, retry mechanism, and client rotation
|
39 |
def text_to_speech(text, retries=3, delay=5):
|
40 |
client_index = 0 # Start with the first client
|