argmaxinc / WhisperKit

On-device Speech Recognition for Apple Silicon
https://takeargmax.com/blog/whisperkit
MIT License
3.17k stars 267 forks source link

Async Progress Callback #145

Closed ZachNagengast closed 4 months ago

ZachNagengast commented 4 months ago

This PR will run the progress callback on separate thread to avoid blocking the decoder loop. If the progress callback is doing a heavy workload it would previously slow down the the decoding waiting for it to complete, this change will allow the callback to be called without waiting. This will potentially result in more loops of the decoder while waiting for the callback to make an early stopping decision, but faster overall.