Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,12 @@ from IPython.display import display, Audio, Markdown, clear_output
|
|
29 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
30 |
|
31 |
#_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
32 |
-
|
33 |
-
import configparser
|
34 |
import os
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
class Translator:
|
37 |
def __init__(self):
|
@@ -405,6 +408,9 @@ def transform(input_data):
|
|
405 |
|
406 |
return magnitude, phase
|
407 |
|
|
|
|
|
|
|
408 |
# Create an instance of the FastAPI class
|
409 |
app = main()
|
410 |
|
|
|
29 |
from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
|
30 |
|
31 |
#_LOGGER = logging.getLogger("piper_train.infer_onnx")
|
|
|
|
|
32 |
import os
|
33 |
+
if not os.path.exists("/content/piper/src/python/lng"):
|
34 |
+
!cp -r "/content/piper/notebooks/lng" /content/piper/src/python/lng
|
35 |
+
import sys
|
36 |
+
sys.path.append('/content/piper/notebooks')
|
37 |
+
import configparser
|
38 |
|
39 |
class Translator:
|
40 |
def __init__(self):
|
|
|
408 |
|
409 |
return magnitude, phase
|
410 |
|
411 |
+
sys.path.append('/content/piper/src/python')
|
412 |
+
|
413 |
+
|
414 |
# Create an instance of the FastAPI class
|
415 |
app = main()
|
416 |
|