Spaces:
Sleeping
Sleeping
AshDavid12
commited on
Commit
·
1cda627
1
Parent(s):
9ccc5b5
await trascribe
Browse files
infer.py
CHANGED
@@ -166,7 +166,7 @@ async def websocket_transcribe(websocket: WebSocket):
|
|
166 |
chunk_duration = len(audio_chunk) / (16000 * 2) # Assuming 16kHz mono WAV (2 bytes per sample)
|
167 |
accumulated_audio_time += chunk_duration
|
168 |
|
169 |
-
partial_result, last_transcribed_time = transcribe_core_ws(temp_audio_file.name,
|
170 |
last_transcribed_time)
|
171 |
accumulated_audio_time = 0 # Reset the accumulated audio time
|
172 |
processed_segments.extend(partial_result['new_segments'])
|
|
|
166 |
chunk_duration = len(audio_chunk) / (16000 * 2) # Assuming 16kHz mono WAV (2 bytes per sample)
|
167 |
accumulated_audio_time += chunk_duration
|
168 |
|
169 |
+
partial_result, last_transcribed_time = await transcribe_core_ws(temp_audio_file.name,
|
170 |
last_transcribed_time)
|
171 |
accumulated_audio_time = 0 # Reset the accumulated audio time
|
172 |
processed_segments.extend(partial_result['new_segments'])
|