Rajhuggingface4253 commited on
Commit
645a377
·
verified ·
1 Parent(s): 005157d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ logger = logging.getLogger("NeuTTS-API")
35
  # Explicitly use CPU as per Dockerfile and Hugging Face free tier compatibility
36
  DEVICE = "cpu"
37
  # Configure Max Workers for concurrent synthesis threads (1-2 is safe for CPU-only)
38
- MAX_WORKERS = 3
39
  tts_executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
40
  SAMPLE_RATE = 24000
41
  CLEANUP_THRESHOLD = 300 # 1 hour in seconds
@@ -358,7 +358,7 @@ async def stream_text_to_speech_cloning(
358
 
359
  async def stream_generator():
360
  loop = asyncio.get_event_loop()
361
- q = asyncio.Queue(maxsize=3)
362
 
363
  async def producer():
364
  try:
 
35
  # Explicitly use CPU as per Dockerfile and Hugging Face free tier compatibility
36
  DEVICE = "cpu"
37
  # Configure Max Workers for concurrent synthesis threads (1-2 is safe for CPU-only)
38
+ MAX_WORKERS = 2
39
  tts_executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
40
  SAMPLE_RATE = 24000
41
  CLEANUP_THRESHOLD = 300 # 1 hour in seconds
 
358
 
359
  async def stream_generator():
360
  loop = asyncio.get_event_loop()
361
+ q = asyncio.Queue(maxsize=2)
362
 
363
  async def producer():
364
  try: