chore: skip short audio in audio practice (#5749)
This commit is contained in:
parent
f7539c184f
commit
13700d9a9a
1 changed files with 5 additions and 0 deletions
|
|
@ -500,6 +500,11 @@ class AnalyticsPracticeState extends State<AnalyticsPractice>
|
|||
activity.langCode,
|
||||
MatrixState.pangeaController.userController.voice,
|
||||
);
|
||||
|
||||
if (audioFile.duration == null || audioFile.duration! <= 2000) {
|
||||
throw "Audio file too short";
|
||||
}
|
||||
|
||||
// Prefetch the translation
|
||||
final translation = await pangeaEvent.requestRespresentationByL1();
|
||||
_audioFiles[eventId] = audioFile;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue