feat: improve dialogue speech recognition and AI intervention

This commit is contained in:
shen
2026-09-19 17:45:25 -07:00
parent 5b9cba793e
commit 335d0304b1
6 changed files with 704 additions and 12 deletions
+18
View File
@@ -111,6 +111,24 @@ class WritingAiFeedback {
final List<String> missing;
}
/// Result of AI intervention during a dialogue turn when preset rules do not match.
class DialogueAiIntervention {
const DialogueAiIntervention({
required this.accepted,
this.suggestion,
required this.explanation,
});
/// Whether the learner's response is semantically acceptable for the turn.
final bool accepted;
/// Inferred or corrected English sentence if there was an ASR slip, typo, or minor mistake.
final String? suggestion;
/// Encouraging, concise Chinese explanation of the situation and recommendation.
final String explanation;
}
class AssessmentRecord {
const AssessmentRecord({
required this.packId,