-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_engine_only.py
More file actions
34 lines (26 loc) · 1001 Bytes
/
test_engine_only.py
File metadata and controls
34 lines (26 loc) · 1001 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
"""Test transcription engine directly without GUI"""
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from scribe.config import AppConfig
from scribe.core.transcription_engine import TranscriptionEngine
print("Loading config...")
config = AppConfig()
print("Creating transcription engine...")
engine = TranscriptionEngine(config)
print("Initializing (this loads the model)...")
success = engine.initialize()
if success:
print("✅ Model loaded successfully!")
print(f"Model: {config.config.whisper.model}")
# Try a quick transcription
print("\nTesting transcription with sample audio...")
import numpy as np
# Generate 3 seconds of silence
sample_rate = 16000
audio = np.zeros(sample_rate * 3, dtype=np.float32)
result = engine.transcribe(audio)
print(f"Transcription result: '{result}'")
print("✅ All tests passed!")
else:
print("❌ Failed to initialize")