Update DPTNet_eval/DPTNet_quant_sep.py
Browse files
DPTNet_eval/DPTNet_quant_sep.py
CHANGED
@@ -36,17 +36,16 @@ def get_conf():
|
|
36 |
def load_dpt_model():
|
37 |
print('Load Separation Model...')
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
if not
|
42 |
-
raise EnvironmentError("環境變數
|
43 |
|
44 |
-
# 從 Hugging Face Hub 下載模型權重
|
45 |
model_path = hf_hub_download(
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
)
|
50 |
|
51 |
# 取得模型參數
|
52 |
conf_filterbank, conf_masknet = get_conf()
|
|
|
36 |
def load_dpt_model():
|
37 |
print('Load Separation Model...')
|
38 |
|
39 |
+
# 從環境變數取得你設定的 Secret 名稱為 SpeechSeparation
|
40 |
+
speech_sep_token = os.getenv("SpeechSeparation")
|
41 |
+
if not speech_sep_token:
|
42 |
+
raise EnvironmentError("環境變數 SpeechSeparation 未設定!")
|
43 |
|
|
|
44 |
model_path = hf_hub_download(
|
45 |
+
repo_id="DeepLearning101/speech-separation",
|
46 |
+
filename="train_dptnet_aishell_partOverlap_B2_300epoch_quan-int8.p",
|
47 |
+
token=speech_sep_token # ✅ 使用你設定的 Secret
|
48 |
+
)
|
49 |
|
50 |
# 取得模型參數
|
51 |
conf_filterbank, conf_masknet = get_conf()
|