-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_whisper.go
More file actions
36 lines (28 loc) · 825 Bytes
/
test_whisper.go
File metadata and controls
36 lines (28 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//go:build ignore
package main
import (
"fmt"
"omnitranscripts/lib"
)
func main() {
// Test whisper availability
fmt.Println("Testing Whisper.cpp integration...")
if lib.IsWhisperAvailable() {
fmt.Println("✓ Whisper.cpp is available")
} else {
fmt.Println("✗ Whisper.cpp is not available")
return
}
// Try to initialize with a test model path
modelPath := "models/ggml-base.en.bin"
fmt.Printf("Attempting to initialize whisper with model: %s\n", modelPath)
ctx, err := lib.InitWhisper(modelPath)
if err != nil {
fmt.Printf("✗ Failed to initialize whisper: %v\n", err)
fmt.Println("Note: This is expected if the model file doesn't exist yet")
return
}
defer ctx.Free()
fmt.Println("✓ Whisper context initialized successfully!")
fmt.Println("CGO integration is working correctly")
}