mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-27 07:52:27 +00:00
86a277f78d
* run `go mod tidy` before building examples Running `make examples` after cloning the repository gives the following error: ``` ... [100%] Built target whisper gmake[3]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build' gmake[2]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build' gmake[1]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build' Build example go-model-download Build example go-whisper examples/go-whisper/process.go:11:2: missing go.sum entry for module providing package github.com/go-audio/wav (imported by github.com/ggerganov/whisper.cpp/bindings/go/examples/go-whisper); to add: go get github.com/ggerganov/whisper.cpp/bindings/go/examples/go-whisper make: *** [Makefile:26: examples/go-whisper] Error 1 ``` * remove executable bit from various files
28 lines
728 B
Go
28 lines
728 B
Go
package whisper
|
|
|
|
import (
|
|
"errors"
|
|
|
|
// Bindings
|
|
whisper "github.com/ggerganov/whisper.cpp/bindings/go"
|
|
)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// ERRORS
|
|
|
|
var (
|
|
ErrUnableToLoadModel = errors.New("unable to load model")
|
|
ErrInternalAppError = errors.New("internal application error")
|
|
ErrProcessingFailed = errors.New("processing failed")
|
|
ErrUnsupportedLanguage = errors.New("unsupported language")
|
|
)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// CONSTANTS
|
|
|
|
// SampleRate is the sample rate of the audio data.
|
|
const SampleRate = whisper.SampleRate
|
|
|
|
// SampleBits is the number of bytes per sample.
|
|
const SampleBits = whisper.SampleBits
|