ruslanmv commited on
Commit
5e9089a
·
verified ·
1 Parent(s): c81f439

Update backend1.py

Browse files
Files changed (1) hide show
  1. backend1.py +3 -3
backend1.py CHANGED
@@ -31,9 +31,9 @@ def select_exam_vce(exam_name):
31
  import time
32
  import httpx
33
  # Text-to-speech clients
34
- client_1 = Client("ruslanmv/text-to-speech-fast")
35
- client_2 = Client("ruslanmv/Text-To-Speech")
36
- client_3 = Client("ruslanmv/Text-to-Voice-Transformers")
37
  clients = [client_1, client_2, client_3]
38
  # Text-to-speech function with rate limiting, retry mechanism, and client rotation
39
  def text_to_speech(text, retries=3, delay=5):
 
31
  import time
32
  import httpx
33
  # Text-to-speech clients
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, client_3]
38
  # Text-to-speech function with rate limiting, retry mechanism, and client rotation
39
  def text_to_speech(text, retries=3, delay=5):