Skip to content

sliding window n-gram candidate generation#2

Open
akashngb wants to merge 3 commits intomainfrom
shallow-fusion
Open

sliding window n-gram candidate generation#2
akashngb wants to merge 3 commits intomainfrom
shallow-fusion

Conversation

@akashngb
Copy link
Copy Markdown
Collaborator

No description provided.

- phonetic_matcher: add find_ngram_matches() for multi-word hotword detection
  using sliding window over transcript word spans (bigrams, trigrams, etc.)
  get_phonetic_similarity now handles multi-word phrases by concatenating
  before phonetic encoding

- lm_rescorer: replace sequential for-loop scoring with batched forward pass
  score_batch() tokenises all sentences together, pads, masks padding with -100,
  and computes per-sentence mean log-likelihood in one shot
  score_candidates() helper wraps score_batch for the fusion processor
  score_context() delegates to score_batch for API consistency

- fusion_processor: two-pass rescoring pipeline
  Pass 1 - sliding window n-gram matching against multi-word hotwords (batched LM)
  Pass 2 - unigram rescoring with batched candidate scoring (replaces inner loop)
  consumed-index set prevents double-processing of n-gram-matched spans
…entation

- main/asr_engine: add MPS/CUDA/CPU device auto-detection and dashboard logging integration
- streamlit app: new interactive UI for audio upload, note upload, and hotword visualization
- dashboard modules: decision logging, analytics, analytics pages, and database utilities
- documentation: full MkDocs site structure and individual guide markdown files
- tests: comprehensive test suite for rescorer component evaluation
- keyword_extractor: BERT-based automated hotword generation from local documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant