Spaces:
Sleeping
Sleeping
Commit
·
f6f628c
1
Parent(s):
1ac399b
code
Browse files
app.py
CHANGED
@@ -29,7 +29,9 @@ else:
|
|
29 |
def transcribe(audio: tuple[int, np.ndarray], conversation: list[dict]):
|
30 |
|
31 |
output = pipe({"audio": audio[1], "turns": conversation, "sampling_rate": audio[0]},
|
32 |
-
max_new_tokens=512
|
|
|
|
|
33 |
|
34 |
conversation.append({"role": "user", "content": output["transcription"]})
|
35 |
conversation.append({"role": "assistant", "content": output["reply"]})
|
|
|
29 |
def transcribe(audio: tuple[int, np.ndarray], conversation: list[dict]):
|
30 |
|
31 |
output = pipe({"audio": audio[1], "turns": conversation, "sampling_rate": audio[0]},
|
32 |
+
max_new_tokens=512,
|
33 |
+
device=0)
|
34 |
+
print("output", output)
|
35 |
|
36 |
conversation.append({"role": "user", "content": output["transcription"]})
|
37 |
conversation.append({"role": "assistant", "content": output["reply"]})
|