[#80] Get emotion results for English portions of mixed-language meetings#88
Merged
Merged
Conversation
Member
Author
QA Confidence Verdict — Story #80 (PR #88)Verdict: PASS (high confidence). All 3 truths and all 3 acceptance criteria are implemented and covered by tests. What Was VerifiedTruths
Acceptance Criteria
Supporting checks
Verification was programmatic (code inspection + unit suite). No Playwright UI drive was performed: this is a backend data-pipeline change whose only user-facing surface is a static copy edit (see below). No running app instance was required. What Needs Human Eyes
Risk Areas
Suggested QA Focus
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #80
Summary
Emotion analysis previously gated on the meeting's single detected language, skipping the entire meeting whenever
detected_language != "en". For a bilingual (English/Thai) meeting this silently discarded all emotional insight, including the English portions.This change replaces the whole-meeting gate with per-segment gating in
_run_emotion_analysis:EmotionUnavailablemarkers instead of being silently dropped.A segment with no per-segment language (single-language path and pre-feature transcripts) falls back to the meeting's detected language, preserving today's behavior exactly (EC-8).
Approach
EmotionUnavailable(segment_id, reason)tobackend/schemas.pyand anemotion_unavailablelist onAudioAnalysis, mirroring the existingProsodyUnavailableprecedent (data-only markers; no new frontend pattern introduced).SUPPORTED_LANGUAGES = frozenset({"en"})inemotion_analyzer.pyas the single source of truth for emotion-supported languages (a non-English SER model is out of scope per OQ-4)._run_emotion_analysispartitions segments by effective languageseg.language or detected_language; when no segment is supported it returnsUNAVAILABLE(neverFAILED) so prosody and interaction still run (AC2).Verification
pytest tests/unit— 250 passed (includes new cases: mixed meeting, no-English meeting reports unavailable-not-failed, sorted multi-language aggregate reason, and unavailable markers surviving an SER exception).ruff checkandruff format --check— clean.