Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 1.0.0 that the waveform is too uniform #144

Closed
csacchetti opened this issue Dec 28, 2022 · 10 comments · Fixed by #154
Closed

version 1.0.0 that the waveform is too uniform #144

csacchetti opened this issue Dec 28, 2022 · 10 comments · Fixed by #154
Labels
enhancement New feature or request

Comments

@csacchetti
Copy link

I ask if there is a possibility with version 1.0.0 that the waveform is not as uniform. The last version before 1.0.0 was more realistic. This one is very normalised and not as precise. Also the scaleFactor increases proportionally in size but still remains very uniform.
Thank you

@csacchetti csacchetti added the enhancement New feature or request label Dec 28, 2022
@ujas-m-simformsolutions
Copy link
Collaborator

@csacchetti Are we here talking about waveform while recording? If yes then how do you suggest we handle the data because the ios and android send different kind of data. In ios we get decibels in full scale and in android we get amplitude. Dbfs is a logarithmic scale so when intensity of sound increases, it's value will logarithmly increase not uniformly.

We are open to any contribution so if you would like to create a PR to improve this functionality than we are happy to have that.

@csacchetti
Copy link
Author

Yes I was talking about waveform while recording, sorry.
I am not asking for something new to be implemented, but simply to restore (as an option) the solution from version 0.1.5+1, which I felt was more precise and less normalised. I don't know what problems there might be in an operation like this, but it would be one more option.

@ujas-m-simformsolutions
Copy link
Collaborator

In 0.1.5+1, we were just adding normalizationFactor to whatever value we get from native. Now, this wasn't good way to do this because every phone has different microphone system so for some phone the normalizationFactor would work but for others you might get inverted waves because native side is providing with negative Dbs, as you can see in this issue #43.

@csacchetti
Copy link
Author

Strange, it worked better for me. I set a different normalizationFactor between Android and iOS but it was satisfactory.
The difficult thing was, especially in Android, to find the right normalisationFactor value.
It must be said, however, that I had only tested two to three phones. I don't know if it worked badly with other phones.

@ujas-m-simformsolutions
Copy link
Collaborator

@csacchetti For 1.0.0 release what we have done is that rather then adding or subtracting any value, We normalize it against max and min value. You can check recorderController.dart it contains a private function _normalise, you can play with it and if you find better solution then you can also do the PR.

@csacchetti
Copy link
Author

Unfortunately I do not yet have the skills to make a change to the plugin. I hoped that putting the option for a behaviour like the previous version would not be a problem for those who have already done so. It remains that Android is acceptable while iOS is too uniform. Patience.
In any case, thanks for the work done.

@Ujas-Majithiya
Copy link
Collaborator

@csacchetti We will discuss this internally see if we should provide the older version.

@csacchetti
Copy link
Author

Thanks

@ujas-m-simformsolutions
Copy link
Collaborator

Ok we will be providing a flag soon to use previous version of normalization until we find better way to normalise

@csacchetti
Copy link
Author

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants