Start to learn vocab from talkgroups to improve accuracy of STT
This commit is contained in:
@@ -83,6 +83,13 @@ async def patch_transcript(
|
||||
"embedding": None,
|
||||
})
|
||||
|
||||
# Learn from the correction: diff original → corrected and add new tokens to vocabulary
|
||||
system_id = call.get("system_id")
|
||||
original_text = call.get("transcript_corrected") or call.get("transcript") or ""
|
||||
if system_id and original_text:
|
||||
from app.internal.vocabulary_learner import learn_from_correction
|
||||
await learn_from_correction(system_id, original_text, body.transcript)
|
||||
|
||||
from app.routers.upload import _run_extraction_pipeline
|
||||
background_tasks.add_task(
|
||||
_run_extraction_pipeline,
|
||||
|
||||
Reference in New Issue
Block a user