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
I am trying to concatenate 2 (or more) audio files that are multiple minutes in size. TO do it, I need to load each of them to crunker. However, there is a problem: the duration of each track is limited to 17.544.
I have experimented locally, and have narrowed down the issue to decodeAudioData function, used inside of the fetchAudio function. More specifically:
constTEST_AUDIO='https://listen.technology/old-article-cache/ZGVsZmkvNTQzNDcyNDQ=';(async()=>{constbuffer=awaitfetch(TEST_AUDIO).then(res=>res.arrayBuffer());constblob=newBlob([buffer],{type: 'audio/mp3'});consturl=URL.createObjectURL(blob);constaudio=newAudio();audio.src=url;awaitaudio.play();awaitaudio.pause();console.log(audio.duration);// results in 75.63525constaudioContext=newAudioContext();constaudioBuffer=awaitaudioContext.decodeAudioData(buffer);console.log(audioBuffer.duration);// results in 17.544})()
I did not find any information about any limits with decodeAudioData, therefore, I suspect my MP3 file might be somewhat invalid.
The text was updated successfully, but these errors were encountered:
Hey!
I am trying to concatenate 2 (or more) audio files that are multiple minutes in size. TO do it, I need to load each of them to crunker. However, there is a problem: the duration of each track is limited to
17.544
.I have experimented locally, and have narrowed down the issue to
decodeAudioData
function, used inside of thefetchAudio
function. More specifically:I did not find any information about any limits with
decodeAudioData
, therefore, I suspect my MP3 file might be somewhat invalid.The text was updated successfully, but these errors were encountered: