update server_fastapi.py: 添加2.1模型推理支持。

This commit is contained in:
Sora
2023-12-03 22:41:36 +08:00
parent 2c50b7816b
commit 3623eed896
2 changed files with 51 additions and 39 deletions

View File

@@ -17,7 +17,7 @@ def get_emo(path):
wav, sr = librosa.load(path, 16000)
device = config.bert_gen_config.device
return process_func(
np.expand_dims(wav, 0).astype(np.float),
np.expand_dims(wav, 0).astype(np.float64),
sr,
model,
processor,