Update handler.py
Browse files- handler.py +3 -10
handler.py
CHANGED
@@ -6,7 +6,6 @@ import base64
|
|
6 |
import numpy as np
|
7 |
import librosa
|
8 |
from scipy.io import wavfile
|
9 |
-
import asyncio
|
10 |
|
11 |
class EndpointHandler:
|
12 |
def __init__(self, model_dir=None):
|
@@ -51,15 +50,9 @@ class EndpointHandler:
|
|
51 |
if not edge_tts_voice:
|
52 |
raise ValueError(f"Invalid voice '{selected_voice}'.")
|
53 |
|
54 |
-
info, edge_tts_output_path, tts_output_data, edge_output_file =
|
55 |
-
model_name,
|
56 |
-
|
57 |
-
edge_tts_voice,
|
58 |
-
slang_rate,
|
59 |
-
use_uploaded_voice,
|
60 |
-
voice_upload_file
|
61 |
-
))
|
62 |
-
|
63 |
if edge_output_file and os.path.exists(edge_output_file):
|
64 |
os.remove(edge_output_file)
|
65 |
|
|
|
6 |
import numpy as np
|
7 |
import librosa
|
8 |
from scipy.io import wavfile
|
|
|
9 |
|
10 |
class EndpointHandler:
|
11 |
def __init__(self, model_dir=None):
|
|
|
50 |
if not edge_tts_voice:
|
51 |
raise ValueError(f"Invalid voice '{selected_voice}'.")
|
52 |
|
53 |
+
info, edge_tts_output_path, tts_output_data, edge_output_file = tts(
|
54 |
+
model_name, tts_text, edge_tts_voice, slang_rate, use_uploaded_voice, voice_upload_file
|
55 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
if edge_output_file and os.path.exists(edge_output_file):
|
57 |
os.remove(edge_output_file)
|
58 |
|