feat: add dictionary support for STT boosting in voice agents (#136)

* feat: add dictionary support for voice agents

Also fixes #132

* chore: add keyterms in evals
This commit is contained in:
Abhishek 2026-01-29 11:20:07 +05:30 committed by GitHub
parent e3a1e0bf07
commit db75d90535
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 9666 additions and 53 deletions

View file

@ -76,8 +76,22 @@ class LoopTalkPipelineBuilder:
pipeline_sample_rate=16000,
)
# Extract keyterms from workflow configurations
keyterms = None
if (
workflow.workflow_configurations
and "dictionary" in workflow.workflow_configurations
):
dictionary = workflow.workflow_configurations["dictionary"]
if dictionary and isinstance(dictionary, str):
keyterms = [
term.strip() for term in dictionary.split(",") if term.strip()
]
if keyterms:
logger.info(f"Using {len(keyterms)} keyterms for STT: {keyterms}")
# Create services
stt = create_stt_service(user_config)
stt = create_stt_service(user_config, keyterms=keyterms)
llm = create_llm_service(user_config)
tts = create_tts_service(user_config, audio_config)