ASR / product /backend /core /engine.py
MihirRPatil's picture
deploy: CDAC ASR backend with pitch/stress fix and LLM feedback
88a679b
Raw
History Blame Contribute Delete
428 Bytes
from src.inference.inference_api import init_pipeline, run_inference
class ASREngine:
def __init__(self, model_dir: str):
init_pipeline(model_dir)
def evaluate(self, audio_path: str, target_word: str = None, target_phonemes: str = None) -> dict:
return run_inference(
audio_path=audio_path,
target_word=target_word,
target_phonemes=target_phonemes
)