Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
30 lines
631 B
Go
30 lines
631 B
Go
//go:build !sherpa
|
|
|
|
package diarization
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"go-whisper-api/config"
|
|
"go-whisper-api/whisper"
|
|
)
|
|
|
|
type stubEngine struct {
|
|
cfg config.Diarization
|
|
}
|
|
|
|
func newEngine(cfg config.Diarization) (Engine, error) {
|
|
return &stubEngine{cfg: cfg.WithDefaults()}, nil
|
|
}
|
|
|
|
func (s *stubEngine) Active() bool {
|
|
return false
|
|
}
|
|
|
|
func (s *stubEngine) Process(context.Context, []float32, int) ([]whisper.Turn, error) {
|
|
return nil, fmt.Errorf("speaker diarization requires build with -tags sherpa and models (make build-sherpa, make download-diarization-models)")
|
|
}
|
|
|
|
func (s *stubEngine) Close() {}
|