How to prevent splitting longer speech into 250 ms chunks in Next.js Livestream Starter? #926
Unanswered
Hunaid98
asked this question in
General help
Replies: 2 comments
-
Thanks for asking your question about Deepgram! If you didn't already include it in your post, please be sure to add as much detail as possible so we can assist you efficiently, such as:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @Hunaid98, when using our real-time streaming endpoint, it's normal to send small chunks of audio to Deepgram. We concatenate them and process longer segments of audio to restore the context. If you want to record a full audio file and then send it to Deepgram, that would use our pre-recorded transcription, not streaming. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am working on a real-time voice transcription project using the Next.js Livestream Starter, and I am facing an issue with how the microphone input is being handled. Specifically, the microphone only allows audio chunks of 250 ms, which causes longer speech to be split into small parts.
I would like to:
Prevent speech from being split into such small chunks (250 ms) and instead allow continuous recording or larger segments.
Accumulate the audio data and send it as one complete request once the user finishes speaking, rather than breaking it into multiple requests for each small chunk.
Current Approach:
I’m using MediaRecorder to capture the audio in my Next.js app, and I use a listener for the dataavailable event, but I am forced to set a timeslice argument (e.g., microphone.start(500)) which results in frequent breaks in the recording.
Here's the relevant code:
Question:
How can I prevent the microphone from breaking the speech into 250 ms chunks?
Is there a way to handle continuous speech in a more efficient manner using the MediaRecorder API or any other approach within the Next.js Livestream?
Thanks in advance for any advice or recommendations!
Beta Was this translation helpful? Give feedback.
All reactions