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
20 lines
407 B
Go
20 lines
407 B
Go
package diarization
|
|
|
|
import (
|
|
"context"
|
|
|
|
"go-whisper-api/config"
|
|
"go-whisper-api/whisper"
|
|
)
|
|
|
|
// Engine runs offline speaker diarization when built with -tags sherpa.
|
|
type Engine interface {
|
|
Active() bool
|
|
Process(ctx context.Context, samples []float32, numClusters int) ([]whisper.Turn, error)
|
|
Close()
|
|
}
|
|
|
|
func New(cfg config.Diarization) (Engine, error) {
|
|
return newEngine(cfg)
|
|
}
|