Open fyang93 opened 2 weeks ago
Hey @fyang93 thanks for your interest in the library. 😁
The DecodeAudioDataAsync method throws an EncodingErrorException
if MIME Sniffing §6.2 Matching an audio or video type pattern doesn't find a MIME type or if it failed to decode it into a linear PCM (pulse code modulation).
When OnDataAvailable is triggered each part isn't actually a valid audio bit alone as it is meant to be continued until the recording stops. So you need to connect all the parts of the recording before decoding for it to be successful.
Could you elaborate on what your use case is? Then I might be able to make a demo that does just that or point you towards some other documentation. :)
I was trying to decode each blob into raw audio byte array, but DecodeAudioDataAsync caused Kristofferstrube.Blazor.WeblDL.Exceptions.EncodingErrorException with message "Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data". Here is my code, do you have any suggestions?