MAZALA2024
commited on
Commit
•
83a36cf
1
Parent(s):
57e959f
Update voice_processing.py
Browse files- voice_processing.py +1 -2
voice_processing.py
CHANGED
@@ -14,7 +14,6 @@ from fairseq import checkpoint_utils
|
|
14 |
import uuid
|
15 |
|
16 |
from config import Config
|
17 |
-
from config import Config, voice_mapping
|
18 |
from lib.infer_pack.models import (
|
19 |
SynthesizerTrnMs256NSFsid,
|
20 |
SynthesizerTrnMs256NSFsid_nono,
|
@@ -134,7 +133,7 @@ def run_async_in_thread(fn, *args):
|
|
134 |
|
135 |
def parallel_tts(tasks):
|
136 |
# Increase max_workers to better utilize CPU and GPU resources
|
137 |
-
with ThreadPoolExecutor(max_workers=
|
138 |
futures = [executor.submit(run_async_in_thread, tts, *task) for task in tasks]
|
139 |
results = [future.result() for future in futures]
|
140 |
return results
|
|
|
14 |
import uuid
|
15 |
|
16 |
from config import Config
|
|
|
17 |
from lib.infer_pack.models import (
|
18 |
SynthesizerTrnMs256NSFsid,
|
19 |
SynthesizerTrnMs256NSFsid_nono,
|
|
|
133 |
|
134 |
def parallel_tts(tasks):
|
135 |
# Increase max_workers to better utilize CPU and GPU resources
|
136 |
+
with ThreadPoolExecutor(max_workers=8) as executor: # Adjust based on your server capacity
|
137 |
futures = [executor.submit(run_async_in_thread, tts, *task) for task in tasks]
|
138 |
results = [future.result() for future in futures]
|
139 |
return results
|