Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def transcribe(audio_path):
|
|
51 |
audio_cnt, sr = librosa.load(audio_path, sr=16000)
|
52 |
|
53 |
# 将音频数据传递给 processor
|
54 |
-
input_values = processor(
|
55 |
|
56 |
# 模型推理
|
57 |
with torch.no_grad():
|
|
|
51 |
audio_cnt, sr = librosa.load(audio_path, sr=16000)
|
52 |
|
53 |
# 将音频数据传递给 processor
|
54 |
+
input_values = processor(audio_cnt, sampling_rate=16000, return_tensors="pt").input_values
|
55 |
|
56 |
# 模型推理
|
57 |
with torch.no_grad():
|