mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-18 14:00:51 +02:00
go : add Encoder Begin Callback (#2900)
Adding in EncoderBeginCallback to the Context's Process callback. This optional callback function returns false if computation should be aborted. Co-authored-by: Amanda Der Bedrosian <aderbedr@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d2aaffd5d9
commit
96db0c5a9c
@@ -67,7 +67,7 @@ func Process(model whisper.Model, path string, flags *Flags) error {
|
||||
// Process the data
|
||||
fmt.Fprintf(flags.Output(), " ...processing %q\n", path)
|
||||
context.ResetTimings()
|
||||
if err := context.Process(data, cb, nil); err != nil {
|
||||
if err := context.Process(data, nil, cb, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user