Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import os, time, urllib.request
|
| 2 |
-
|
| 3 |
-
os.environ["OMP_NUM_THREADS"] = str(NCPU)
|
| 4 |
|
| 5 |
BASE = "https://raw.githubusercontent.com/OpenMOSS/MOSS-TTS-Nano/main"
|
| 6 |
for fn in ["onnx_tts_runtime.py", "ort_cpu_runtime.py",
|
|
@@ -26,7 +25,7 @@ VOICES = ["Junhao","Zhiming","Weiguo","Xiaoyu","Yuewen","Lingyu","Trump","Ava","
|
|
| 26 |
def get_rt():
|
| 27 |
global RT
|
| 28 |
if RT is None:
|
| 29 |
-
RT = OnnxTtsRuntime(os.environ.get("MOSS_MODEL_DIR", "models"), thread_count=
|
| 30 |
return RT
|
| 31 |
|
| 32 |
def synth(text, voice, ref, smode, mf, seed, at, ak, ap, ar):
|
|
|
|
| 1 |
import os, time, urllib.request
|
| 2 |
+
os.environ["OMP_NUM_THREADS"] = "1"
|
|
|
|
| 3 |
|
| 4 |
BASE = "https://raw.githubusercontent.com/OpenMOSS/MOSS-TTS-Nano/main"
|
| 5 |
for fn in ["onnx_tts_runtime.py", "ort_cpu_runtime.py",
|
|
|
|
| 25 |
def get_rt():
|
| 26 |
global RT
|
| 27 |
if RT is None:
|
| 28 |
+
RT = OnnxTtsRuntime(os.environ.get("MOSS_MODEL_DIR", "models"), thread_count=1, execution_provider="cpu")
|
| 29 |
return RT
|
| 30 |
|
| 31 |
def synth(text, voice, ref, smode, mf, seed, at, ak, ap, ar):
|