mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
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:
parent
e3a1e0bf07
commit
db75d90535
23 changed files with 9666 additions and 53 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue