From 7963cc8a52dfc62580e0deb155f85b901d594ed7 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 6 Aug 2025 10:22:51 -0600 Subject: [PATCH] fix: delayed waveform loading (#538) --- server/reflector/views/transcripts_audio.py | 18 ------------------ .../(app)/transcripts/[transcriptId]/page.tsx | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/server/reflector/views/transcripts_audio.py b/server/reflector/views/transcripts_audio.py index f3dccc4c..b5ce3cd2 100644 --- a/server/reflector/views/transcripts_audio.py +++ b/server/reflector/views/transcripts_audio.py @@ -51,24 +51,6 @@ async def transcript_get_audio_mp3( transcript_id, user_id=user_id ) - if transcript.audio_location == "storage": - # proxy S3 file, to prevent issue with CORS - url = await transcript.get_audio_url() - headers = {} - - copy_headers = ["range", "accept-encoding"] - for header in copy_headers: - if header in request.headers: - headers[header] = request.headers[header] - - async with httpx.AsyncClient() as client: - resp = await client.request(request.method, url, headers=headers) - return Response( - content=resp.content, - status_code=resp.status_code, - headers=resp.headers, - ) - if transcript.audio_location == "storage": # proxy S3 file, to prevent issue with CORS url = await transcript.get_audio_url() diff --git a/www/app/(app)/transcripts/[transcriptId]/page.tsx b/www/app/(app)/transcripts/[transcriptId]/page.tsx index 4f0a6ef3..0a2dba47 100644 --- a/www/app/(app)/transcripts/[transcriptId]/page.tsx +++ b/www/app/(app)/transcripts/[transcriptId]/page.tsx @@ -32,7 +32,7 @@ export default function TranscriptDetails(details: TranscriptDetails) { const topics = useTopics(transcriptId); const waveform = useWaveform( transcriptId, - waiting || mp3.loading || mp3.audioDeleted === true, + waiting || mp3.audioDeleted === true, ); const useActiveTopic = useState(null);