forked from deepgram-devs/nextjs-live-transcription
-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
When clicking on the audio playback for the agent message the rate of speech is to fast, it sounds like a chipmunk.
The Problem:
- Deepgram output sample rate:
24000 Hz(line 95 in WebSocketContext.tsx) - Playback button sample rate:
48000 Hz(line 41 in MessageAudio.tsx)
When you tell AudioContext the audio is 48kHz but it's actually 24kHz, it plays back at 2x speed = chipmunk voice!
Possible Fix:
const audioBuffer = audioContext.createBuffer(
1,
audioDataView.length,
24000 // ← Change from 48000 to 24000
);Why live playback sounds fine:
The real-time playback during conversation uses proper scheduling in WebSocketContext.tsx which handles the sample rate correctly. Only the replay button has the hardcoded mismatch.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels