mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
review fixes
This commit is contained in:
@@ -260,8 +260,6 @@ async def transcript_get_audio_waveform(
|
|||||||
if not transcript.audio_mp3_filename.exists():
|
if not transcript.audio_mp3_filename.exists():
|
||||||
raise HTTPException(status_code=404, detail="Audio not found")
|
raise HTTPException(status_code=404, detail="Audio not found")
|
||||||
|
|
||||||
# await run_in_threadpool(transcript.convert_audio_to_waveform)
|
|
||||||
|
|
||||||
return transcript.audio_waveform
|
return transcript.audio_waveform
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -402,15 +402,11 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
console.debug("WebSocket connection closed");
|
console.debug("WebSocket connection closed");
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
case 1000: // Normal Closure:
|
case 1000: // Normal Closure:
|
||||||
case 1001: // Going Away:
|
|
||||||
case 1005:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
setError(
|
setError(
|
||||||
new Error(`WebSocket closed unexpectedly with code: ${event.code}`),
|
new Error(`WebSocket closed unexpectedly with code: ${event.code}`),
|
||||||
"Disconnected",
|
"Disconnected",
|
||||||
);
|
);
|
||||||
}
|
|
||||||
console.log(
|
console.log(
|
||||||
"Socket is closed. Reconnect will be attempted in 1 second.",
|
"Socket is closed. Reconnect will be attempted in 1 second.",
|
||||||
event.reason,
|
event.reason,
|
||||||
@@ -418,6 +414,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ws = new WebSocket(url);
|
ws = new WebSocket(url);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user