diff --git a/backend/voiceover/utils.py b/backend/voiceover/utils.py index 2de2e17c..13ae1b61 100644 --- a/backend/voiceover/utils.py +++ b/backend/voiceover/utils.py @@ -1157,6 +1157,14 @@ def check_audio_completion(voice_over_obj): "message": "There is no audio present in this card.", } ) + if (get_original_duration(voice_over_obj.payload["payload"][str(index)]["start_time"], voice_over_obj.payload["payload"][str(index)]["end_time"]) < 0.1): + missing_cards.append( + { + "card_number": index + 1, + "message": "Duration is 0 for this card.", + } + ) + return missing_cards diff --git a/backend/voiceover/views.py b/backend/voiceover/views.py index b7d5fe70..07d92b73 100644 --- a/backend/voiceover/views.py +++ b/backend/voiceover/views.py @@ -1141,11 +1141,6 @@ def save_voice_over(request): ) original_duration = get_original_duration(start_time, end_time) - if original_duration < 0.1: - return Response( - {"message": "Duration can't be 0 for segment "+str(index+1)}, - status=status.HTTP_400_BAD_REQUEST, - ) if ( voice_over.voice_over_type == "MACHINE_GENERATED"