voice-intelligence / inference.py
unknownfriend00007's picture
Upload 11 files
0d0b668 verified
raw
history blame contribute delete
804 Bytes
from __future__ import annotations
from typing import Any
try:
from .config import VoiceRuntimeConfig
from .transcription_groq import transcribe_groq
except ImportError: # HF flat-root execution fallback
from config import VoiceRuntimeConfig
from transcription_groq import transcribe_groq
def transcribe(
wav_path: str,
config: VoiceRuntimeConfig,
language_hint: str | None,
) -> tuple[list[Any], str, str]:
segments, language, language_source, _ = transcribe_groq(wav_path, config, language_hint)
return segments, language, language_source
def transcribe_with_metadata(
wav_path: str,
config: VoiceRuntimeConfig,
language_hint: str | None,
) -> tuple[list[Any], str, str, dict[str, Any]]:
return transcribe_groq(wav_path, config, language_hint)