Simplify editor cleanup and keep live ASR metadata
Some checks are pending
ci / test-and-build (push) Waiting to run

Keep the daemon path on the full ASR result so word timings and detected language survive into the editor pipeline instead of falling back to a plain transcript string.

Add PipelineEngine.run_asr_result(), have aman call it when live ASR data is available, and cover the word-aware alignment behavior in the daemon tests.

Collapse the llama cleanup flow to a single JSON-shaped completion while leaving the legacy pass1/pass2 parameters in place as compatibility no-ops.

Validated with PYTHONPATH=src python3 -m unittest tests.test_aiprocess tests.test_aman.
This commit is contained in:
Thales Maciel 2026-03-12 13:24:36 -03:00
parent 8c1f7c1e13
commit fa91f313c4
No known key found for this signature in database
GPG key ID: 33112E6833C34679
5 changed files with 166 additions and 84 deletions

View file

@ -53,12 +53,20 @@ class PipelineEngine:
raise RuntimeError("asr stage is not configured")
started = time.perf_counter()
asr_result = self._asr_stage.transcribe(audio)
return self.run_asr_result(asr_result, started_at=started)
def run_asr_result(
self,
asr_result: AsrResult,
*,
started_at: float | None = None,
) -> PipelineResult:
return self._run_transcript_core(
asr_result.raw_text,
language=asr_result.language,
asr_result=asr_result,
words=asr_result.words,
started_at=started,
started_at=time.perf_counter() if started_at is None else started_at,
)
def run_transcript(self, transcript: str, *, language: str = "auto") -> PipelineResult: