You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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")
|
|
|
|
ErrModelNotMultilingual = errors.New("model is not multilingual")
|
|
|
|
)
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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
|