csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
348 stars 217 forks source link

Methods for Adding Amplitude Monitoring for Audio #476

Closed DuQuanzhong closed 2 months ago

DuQuanzhong commented 3 months ago

Hello, can you please add a method for monitoring audio amplitude? Thank you.

sowens-csd commented 3 months ago

There is a callback available on the listen method onSoundLevelChange that can be used. Is that what you're looking for?

DuQuanzhong commented 3 months ago

Thank you very much, also the range for this value?

sowens-csd commented 3 months ago

The value is in decibels, I don't know how accurate the platform specific decibel calculation done by the OS is but the range should be around what you'd expect for voice.