chore: add audio on match in practice (#5580)
* chore: add audio on match in practice * play audio for target instead of choice * remove debugprint --------- Co-authored-by: ggurdin <ggurdin@gmail.com>
This commit is contained in:
parent
e83f76b95b
commit
27740f2967
1 changed files with 9 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ import 'package:fluffychat/pangea/practice_activities/practice_generation_repo.d
|
|||
import 'package:fluffychat/pangea/practice_activities/practice_selection.dart';
|
||||
import 'package:fluffychat/pangea/practice_activities/practice_selection_repo.dart';
|
||||
import 'package:fluffychat/pangea/practice_activities/practice_target.dart';
|
||||
import 'package:fluffychat/pangea/text_to_speech/tts_controller.dart';
|
||||
import 'package:fluffychat/pangea/toolbar/message_practice/message_practice_mode_enum.dart';
|
||||
import 'package:fluffychat/pangea/toolbar/message_practice/morph_selection.dart';
|
||||
import 'package:fluffychat/pangea/toolbar/message_practice/practice_record_controller.dart';
|
||||
|
|
@ -225,6 +226,14 @@ class PracticeController with ChangeNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
if (_activity is LemmaMeaningPracticeActivityModel ||
|
||||
_activity is EmojiPracticeActivityModel) {
|
||||
TtsController.tryToSpeak(
|
||||
token.text.content,
|
||||
langCode: MatrixState.pangeaController.userController.userL2!.langCode,
|
||||
);
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue