File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ <h3>Transcription:</h3>
147
147
let isRecording = false ;
148
148
let exitWarningEnabled = false ;
149
149
let mp3Encoder = null ;
150
- let mp3EncoderSampleRate = 44100 ; // Default sample rate for MP3 encoder
151
150
152
151
// Check if the browser supports the required APIs
153
152
if ( ! window . MediaRecorder || ! ( window . webkitSpeechRecognition || window . SpeechRecognition ) ) {
@@ -214,8 +213,7 @@ <h3>Transcription:</h3>
214
213
let mp3Data = [ ] ;
215
214
216
215
// Initialize MP3 encoder with proper sample rate
217
- mp3EncoderSampleRate = audioContext . sampleRate ;
218
- mp3Encoder = new lamejs . Mp3Encoder ( 1 , mp3EncoderSampleRate , 128 ) ;
216
+ mp3Encoder = new lamejs . Mp3Encoder ( 1 , audioContext . sampleRate , 64 ) ;
219
217
220
218
audioProcessor . onaudioprocess = ( e ) => {
221
219
if ( ! isRecording ) return ;
You can’t perform that action at this time.
0 commit comments