From: Murilo Santana Date: Tue, 4 Jul 2023 13:05:35 +0000 (-0300) Subject: go : fix context.Process call in examples (#1067) X-Git-Tag: upstream/1.7.4~1386 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=66616dbd4d19872d1dc791dc90bb51da1a71afde;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp go : fix context.Process call in examples (#1067) --- diff --git a/bindings/go/README.md b/bindings/go/README.md index 2b14c309..1968cfd2 100644 --- a/bindings/go/README.md +++ b/bindings/go/README.md @@ -31,7 +31,7 @@ func main() { if err != nil { panic(err) } - if err := context.Process(samples, nil); err != nil { + if err := context.Process(samples, nil, nil); err != nil { return err } @@ -71,7 +71,7 @@ The examples are placed in the `build` directory. Once built, you can download a And you can then test a model against samples with the following command: ```bash -./build/go-whisper -model models/ggml-tiny.en.bin samples/jfk.wav +./build/go-whisper -model models/ggml-tiny.en.bin samples/jfk.wav ``` ## Using the bindings diff --git a/bindings/go/examples/go-whisper/process.go b/bindings/go/examples/go-whisper/process.go index d25fcd14..71e52f01 100644 --- a/bindings/go/examples/go-whisper/process.go +++ b/bindings/go/examples/go-whisper/process.go @@ -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); err != nil { + if err := context.Process(data, cb, nil); err != nil { return err }