SKKbySSK / coast_audio

Real-Time audio processing library written in Dart.
MIT License
97 stars 12 forks source link

Bug: unsupported format found in riff chunk: WAVE- #22

Closed BigGitWorld closed 7 months ago

BigGitWorld commented 7 months ago

Hello. I'm using this package in ubuntu 22.04. When I pass a wav file to the AudioFileDataSource:

final dataSource = AudioFileDataSource(file: File('my-wav-file.wav'), mode: FileMode.read);
final WavAudioDecoder decoder = WavAudioDecoder(dataSource: dataSource);

the below error is shown:

unsupported format found in riff chunk: WAVE-

It seems that this package can not correctly decode header of wav file. What is problem?

SKKbySSK commented 7 months ago

Hi @BigGitWorld. Thanks for the bug report.

Can you provide the (header of) wav file? I think 44 bytes of data should be enough to analyze the header.

AndroidDesigner commented 7 months ago

Hi @BigGitWorld. Thanks for the bug report.

Can you provide the (header of) wav file? I think 44 bytes of data should be enough to analyze the header.

Hello dear @SKKbySSK Its my wav file.

SKKbySSK commented 7 months ago

Hi @AndroidDesigner . Thanks for providing the file. I got a FormatException instead of the commented error.

But it looks like the text encoding problem and I've fixed it on this PR: https://github.com/SKKbySSK/coast_audio/pull/23 You can test it by writing this dependency

  coast_audio:
    git:
      url: https://github.com/SKKbySSK/coast_audio.git
      ref: feature/fix-wav-decoder
      path: packages/coast_audio
AndroidDesigner commented 7 months ago

Hi @SKKbySSK Thank you. It works fine. Can you please add onset detection (similar to librosa python package) to the package also? Because its important in audio processing.

SKKbySSK commented 7 months ago

Can you please add onset detection (similar to librosa python package) to the package also? Because it's important in audio processing.

I have no plan for such high level audio analysis support for now. By the way, thank you for the advice.