Spaces:
Running
on
T4
Running
on
T4
Commit
·
2d88e5d
1
Parent(s):
b2051b3
code
Browse files
app.py
CHANGED
@@ -33,7 +33,8 @@ def transcribe(audio: tuple[int, np.ndarray], conversation: list[dict], gradio_c
|
|
33 |
original_sr = audio[0]
|
34 |
target_sr = 16000
|
35 |
|
36 |
-
audio_sr = librosa.resample(audio[1]
|
|
|
37 |
|
38 |
output = pipe({"audio": audio_sr, "turns": conversation, "sampling_rate": target_sr},
|
39 |
max_new_tokens=512)
|
|
|
33 |
original_sr = audio[0]
|
34 |
target_sr = 16000
|
35 |
|
36 |
+
audio_sr = librosa.resample(audio[1].astype(np.float32) / 32768.0,
|
37 |
+
orig_sr=original_sr, target_sr=target_sr)
|
38 |
|
39 |
output = pipe({"audio": audio_sr, "turns": conversation, "sampling_rate": target_sr},
|
40 |
max_new_tokens=512)
|