]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
go : fix context.Process call in examples (#1067)
authorMurilo Santana <redacted>
Tue, 4 Jul 2023 13:05:35 +0000 (10:05 -0300)
committerGitHub <redacted>
Tue, 4 Jul 2023 13:05:35 +0000 (16:05 +0300)
bindings/go/README.md
bindings/go/examples/go-whisper/process.go

index 2b14c30930fa861a76aad282461aabf5e2139582..1968cfd24700be7acdf5d54b9044b520e1425911 100644 (file)
@@ -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
index d25fcd149ea8cb726ea622aa5fe28949398bc1d3..71e52f0100069191c1321098d15f6df7b401b836 100644 (file)
@@ -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
        }