You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently I want to get the recordingBlob every 30 seconds without calling stopRecording(). What I doing now is to call stopRecording and startRecording suddenly after it. However, it took around 1second to continue the recording and the audio between stopRecording and startRecording is not record. Is there any way to do it?
This is my implementation
const recorderControls = useAudioRecorder();
useEffect(() => {
if (!duringRecord) return;
if (recorderControls.recordingTime === 30) {
recorderControls.stopRecording();
}
if (recorderControls.recordingTime === 0) {
recorderControls.startRecording();
}
}, [recorderControls.recordingTime]);
useEffect(() => {
if (!recorderControls.recordingBlob) return;
setSecBlob(recorderControls.recordingBlob);
}, [recorderControls.recordingBlob]);
useEffect(() => {
if (!secBlob) return;
console.log("secBlob:" + secBlob);
blobToTranscript(secBlob);
}, [secBlob]);
// how I call the component
<AudioRecorder
// onRecordingComplete={(audioBlob) =>
// blobToTranscript(audioBlob)
// }
audioTrackConstraints={{
noiseSuppression: true,
echoCancellation: true,
}}
showVisualizer={true}
recorderControls={recorderControls}
classes={{
AudioRecorderClass: "recorder",
AudioRecorderTimerClass: "display-none",
AudioRecorderStatusClass:
"content status bg-gray-200 p-2 rounded",
AudioRecorderStartSaveClass: "display-none",
AudioRecorderPauseResumeClass: "display-none",
AudioRecorderDiscardClass: "display-none",
}}
Expected behavior
I want to let the recorder always record the audio. During the recoding, I want to get the 30sec chunks of the blob. ie 0-30sec, 30-60sec etc. continuously
Package info (please complete the following information):
Version 2.1.2
Nextjs 13.5.2
The text was updated successfully, but these errors were encountered:
TanachaiAnakewat
changed the title
Is there a way to get recordingBlob during the record
Is there a way to get recordingBlob during the record without calling stopRecording()
Nov 23, 2023
Describe the bug
Currently I want to get the recordingBlob every 30 seconds without calling stopRecording(). What I doing now is to call stopRecording and startRecording suddenly after it. However, it took around 1second to continue the recording and the audio between stopRecording and startRecording is not record. Is there any way to do it?
This is my implementation
Expected behavior
I want to let the recorder always record the audio. During the recoding, I want to get the 30sec chunks of the blob. ie 0-30sec, 30-60sec etc. continuously
Package info (please complete the following information):
The text was updated successfully, but these errors were encountered: