bindings : initial import of golang bindings (#287)

* Initial import of golang bindings

* Updated makefile rules

* Updated bindings

* Makefile update to add in more tests
This commit is contained in:
David Thorpe
2022-12-20 07:54:33 +01:00
committed by GitHub
parent 90564f85f9
commit 231bebca7d
21 changed files with 1626 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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