Spaces:
Paused
Paused
Commit
·
0471c24
1
Parent(s):
6d7b9dd
add code
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def transcribe(audio: tuple[int, np.ndarray], conversation: list[dict], gradio_c
|
|
39 |
|
40 |
output = pipe({"audio": audio_sr, "turns": conversation, "sampling_rate": target_sr},
|
41 |
max_new_tokens=512)
|
42 |
-
transcription = whisper({"array": audio_sr, "sampling_rate": target_sr})
|
43 |
|
44 |
conversation.append({"role": "user", "content": transcription})
|
45 |
conversation.append({"role": "assistant", "content": output})
|
|
|
39 |
|
40 |
output = pipe({"audio": audio_sr, "turns": conversation, "sampling_rate": target_sr},
|
41 |
max_new_tokens=512)
|
42 |
+
transcription = whisper({"array": audio_sr.squeeze(), "sampling_rate": target_sr})
|
43 |
|
44 |
conversation.append({"role": "user", "content": transcription})
|
45 |
conversation.append({"role": "assistant", "content": output})
|