Closed anson0370 closed 4 months ago
Hey,
Unfortunately, I have absolutely no knowledge of how mp3 encoding / decoding works, so I can't help you here
I just wonder why you just don't decode the mp3 file entirely and playback the chunks you need using an AudioBufferSourceNode
? It is possible to play only parts of an AudioBuffer
using the source.start(time, offset, duration)
signature (cf. https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)
Hey @b-ma , thanks for the reply.
Download the entire MP3 file is too large and takes too long. I need to collect audio features from multiple points within a few seconds to compare the differences between two audio files.
I'll close this issue. Thanks.
Hi Team,
Thank you for your work. I've encountered some issues while using this library, but since I know nothing about audio parsing, I have to ask for your help.
I retrieve a segment of incomplete MP3 audio data through
http header range: bytes xxx-xxx
, and then usenode-web-audio-api
to decode it. Most of the time, it works well, but sometimes the following errors occur.But every time I try to reproduce it, it's really hard to do so. In my use case, these MP3 audio files come with DAI (Dynamic Ad Insertion), so the audio files are actually different each time.
I don't know what's causing the above error or if it's possible to avoid it. For example, when such an error occurs, I move the range position a bit?