diff --git a/lhotse/audio/backend.py b/lhotse/audio/backend.py index 278f2b00b..cd6532e70 100644 --- a/lhotse/audio/backend.py +++ b/lhotse/audio/backend.py @@ -516,6 +516,10 @@ def handles_special_case(self, path_or_fd: Union[Pathlike, FileObject]) -> bool: return False def is_applicable(self, path_or_fd: Union[Pathlike, FileObject]) -> bool: + if isinstance(path_or_fd, (Path, str)) and any( + str(path_or_fd).endswith(ext) for ext in [".mp4", ".m4a", ".m4b"] + ): + return False return True def supports_save(self) -> bool: @@ -571,6 +575,9 @@ def read_audio( duration=duration, ) + def supports_info(self): + return True + def info( self, path_or_fd: Union[Pathlike, FileObject], diff --git a/lhotse/cut/set.py b/lhotse/cut/set.py index 5a62ba21c..a878ada21 100644 --- a/lhotse/cut/set.py +++ b/lhotse/cut/set.py @@ -3570,7 +3570,7 @@ def _export_to_shar_single( except Exception as e: if fault_tolerant: logging.warning( - "Skipping: failed to load cut '{cut.id}'. Error message: {e}." + f"Skipping: failed to load cut '{cut.id}'. Error message: {e}." ) else: raise