Skip to content

Commit

Permalink
DMP-4385 Filter out 0 second audios from ATS processing
Browse files Browse the repository at this point in the history
Added tests for ATS filtering to filter out audio files that have less than a second apart
  • Loading branch information
karen-hedges committed Jan 3, 2025
1 parent a8a12e3 commit 78daf81
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ public List<AudioFileInfo> processAudioForPlaybacks(Map<MediaEntity, Path> media
List<AudioFileInfo> concatenatedAndMergedAudioFileInfos = new ArrayList<>();
if (isNotEmpty(audioFileInfos)) {
// Used for logging only
String audioFilenames = audioFileInfos.stream().map(AudioFileInfo::getMediaFile).collect(Collectors.joining(", "));
String audioFilenames = null;
if (log.isDebugEnabled()) {
audioFileInfos.stream().map(AudioFileInfo::getMediaFile).collect(Collectors.joining(", "));
}

List<ChannelAudio> concatenationsList = new ArrayList<>();

if (isWellFormedAudio(audioFileInfos)) {
log.debug("Audio files {} are well formed", audioFilenames);
List<ChannelAudio> concatenatedAudios = concatenateByChannelWithGaps(audioFileInfos);
Expand Down

0 comments on commit 78daf81

Please sign in to comment.