Install espeak-ng
Browse files- pipeline.py +6 -0
pipeline.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
from typing import Tuple
|
|
|
2 |
|
3 |
from torch import no_grad, package
|
4 |
import numpy as np
|
@@ -10,6 +11,11 @@ import os
|
|
10 |
|
11 |
class PreTrainedPipeline():
|
12 |
def __init__(self, path: str):
|
|
|
|
|
|
|
|
|
|
|
13 |
model_path = os.path.join(path, "model.pt")
|
14 |
importer = package.PackageImporter(model_path)
|
15 |
synt = importer.load_pickle("tts_models", "model")
|
|
|
1 |
from typing import Tuple
|
2 |
+
import subprocess
|
3 |
|
4 |
from torch import no_grad, package
|
5 |
import numpy as np
|
|
|
11 |
|
12 |
class PreTrainedPipeline():
|
13 |
def __init__(self, path: str):
|
14 |
+
# Install espeak-ng
|
15 |
+
subprocess.run("apt-get update -y && apt-get install espeak-ng -y", shell=True,
|
16 |
+
universal_newlines=True, start_new_session=True)
|
17 |
+
|
18 |
+
# Init model
|
19 |
model_path = os.path.join(path, "model.pt")
|
20 |
importer = package.PackageImporter(model_path)
|
21 |
synt = importer.load_pickle("tts_models", "model")
|