Subtitle-Synchronizer / jlibrosa

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

Library fails to parse numbers to float when device language is not English. #16

Open thedroiddiv opened 1 month ago

thedroiddiv commented 1 month ago

I'm using the library in an Android App. When I change the language of the app to any local Indian languages like Hindi or Bengali, the library gets number is localized format and fails to parse it.

java.lang.NumberFormatException: For input string: "-০.০০০০৩"
  at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
  at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
  at java.lang.Float.parseFloat(Float.java:455)
  at com.jlibrosa.audio.JLibrosa.loadAndReadWithOffset(JLibrosa.java:539)
  at com.jlibrosa.audio.JLibrosa.loadAndRead(JLibrosa.java:564)