gkonovalov / android-vad

Android Voice Activity Detection (VAD) library. Supports WebRTC VAD GMM, Silero VAD DNN, Yamnet VAD DNN models.
MIT License
261 stars 60 forks source link

Manually call the setter of `speechDurationMs`/`silenceDurationMs` wh… #18

Closed twiceyuan closed 1 year ago

twiceyuan commented 1 year ago

…en creating VadSilero

When using the builder to create a VadSilero object, speechDurationMs and silenceDurationMs do not actually take effect, because they rely on the setter function of the field to trigger the update of maxSpeechFramesCount and maxSilenceFramesCount, and the construction parameters of kotlin will not trigger this operation

Manually call the setters of duration parameters during init construction to ensure they are properly assigned.

gkonovalov commented 1 year ago

@twiceyuan Thank you for your contribution!