Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from fastapi.responses import StreamingResponse, Response, HTMLResponse
|
|
13 |
from fastapi.middleware import Middleware
|
14 |
from fastapi.middleware.gzip import GZipMiddleware
|
15 |
|
16 |
-
from misaki import en
|
17 |
|
18 |
from onnxruntime import InferenceSession
|
19 |
from huggingface_hub import snapshot_download
|
@@ -146,7 +146,7 @@ def audio_tensor_to_opus_bytes(audio_tensor: torch.Tensor, sample_rate: int = 24
|
|
146 |
|
147 |
|
148 |
# Initialize G2P for English (American)
|
149 |
-
g2p =
|
150 |
|
151 |
def tokenizer(text: str):
|
152 |
"""
|
|
|
13 |
from fastapi.middleware import Middleware
|
14 |
from fastapi.middleware.gzip import GZipMiddleware
|
15 |
|
16 |
+
from misaki import en, espeak
|
17 |
|
18 |
from onnxruntime import InferenceSession
|
19 |
from huggingface_hub import snapshot_download
|
|
|
146 |
|
147 |
|
148 |
# Initialize G2P for English (American)
|
149 |
+
g2p = espeak.EspeakG2P(language="American English")
|
150 |
|
151 |
def tokenizer(text: str):
|
152 |
"""
|