Spaces:
Sleeping
Sleeping
AshDavid12
commited on
Commit
·
bbca80e
1
Parent(s):
c5f73dc
work on wav files
Browse files
infer.py
CHANGED
@@ -211,6 +211,7 @@ async def websocket_transcribe(websocket: WebSocket):
|
|
211 |
chunk_counter += 1
|
212 |
with open(chunk_filename, 'wb') as audio_file:
|
213 |
audio_file.write(audio_chunk)
|
|
|
214 |
# Write audio chunk to file and accumulate size and time
|
215 |
temp_audio_file.write(audio_chunk)
|
216 |
temp_audio_file.flush()
|
@@ -238,7 +239,7 @@ async def websocket_transcribe(websocket: WebSocket):
|
|
238 |
response = {
|
239 |
"new_segments": partial_result['new_segments'],
|
240 |
"processed_segments": processed_segments,
|
241 |
-
"download_url": f"https://gigaverse-ivrit-ai-streaming.hf.space/download_audio/{os.path.basename(chunk_filename)}
|
242 |
}
|
243 |
logging.info(f"Sending {len(partial_result['new_segments'])} new segments to the client.")
|
244 |
await websocket.send_json(response)
|
|
|
211 |
chunk_counter += 1
|
212 |
with open(chunk_filename, 'wb') as audio_file:
|
213 |
audio_file.write(audio_chunk)
|
214 |
+
|
215 |
# Write audio chunk to file and accumulate size and time
|
216 |
temp_audio_file.write(audio_chunk)
|
217 |
temp_audio_file.flush()
|
|
|
239 |
response = {
|
240 |
"new_segments": partial_result['new_segments'],
|
241 |
"processed_segments": processed_segments,
|
242 |
+
"download_url": f"https://gigaverse-ivrit-ai-streaming.hf.space/download_audio/{os.path.basename(chunk_filename)}"
|
243 |
}
|
244 |
logging.info(f"Sending {len(partial_result['new_segments'])} new segments to the client.")
|
245 |
await websocket.send_json(response)
|