Subtitle-Synchronizer / jlibrosa

Librosa equivalent Java library to process audio file adn extract features from it.
MIT License
89 stars 26 forks source link

Sample Rate not working #3

Open yichengye310 opened 3 years ago

yichengye310 commented 3 years ago

Hi,

Firstly, thank you very much for your fine work.

I am trying to use your repo to read in wav files.

The python code is (so I am using the default sampling rate of 22050):

sound_clip, sr = librosa.load(audioFilePath)

and I got:

[0.00557333 0.00983567 0.00837638 ... 0.01534646 0.01109151 0.00635755]

With your repo, I use:

val buffer = librosa.loadAndReadAcrossChannels(audioFilePath, 22050, -1);

And I got:

[0.007446516312143315 0.00848414563432722 0.009186071352275156 0.009369182409131139...0.005554368724631489 0.00445570238349559 0.0036011841181676687]

I guess the sampling rate is not working because if I use the sampling rate from the wave file(48000), the results are the same. ...or am I missing anything?

I look forward to hearing from you.

Thank you very much.

VVasanth commented 3 years ago

Hi Yeyicheng,

There are some issues with the sampling rate and I will have it addressed in the next version. I hope the library works fine with the default sampling rate and the issue comes only with the custom sampling rate. Am I right?

Thanks!

yichengye310 commented 3 years ago

Yes. I cannot solve it by myself, so I am looking forward to your update. XD

On Tue, Nov 3, 2020 at 11:22 PM VVasanth notifications@github.com wrote:

Hi Yeyicheng,

There are some issues with the sampling rate and I will have it addressed in the next version. I hope the library works fine with the default sampling rate and the issue comes only with the custom sampling rate. Am I right?

Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Subtitle-Synchronizer/jlibrosa/issues/3#issuecomment-721503707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGUQIVAWYMM7K55VBCUDLSODJHNANCNFSM4TGZITBA .

-- Best regards, Yicheng Ye