initial commit

This commit is contained in:
2026-04-07 03:58:35 -04:00
commit ce41bca422
17 changed files with 1184 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import numpy as np
class ASREngine:
"""Wraps Qwen3-ASR for speech-to-text transcription."""
def __init__(self, model):
self.model = model
def transcribe(self, audio_16k: np.ndarray) -> str:
"""Transcribe a complete utterance.
Args:
audio_16k: Float32 numpy array at 16kHz sample rate.
Returns:
Transcribed text string.
"""
results = self.model.transcribe(
audio=(audio_16k, 16000),
language=None, # auto-detect
)
if results and results[0].text:
return results[0].text.strip()
return ""