Commit 1da2bd1
Changed files (1)
src
asr
src/asr/utils.py
@@ -119,7 +119,7 @@ def audio_duration(path: str | Path) -> float:
async def get_file_bytes(path_or_bytes: str | Path | bytes) -> bytes:
file_bytes = b""
if isinstance(path_or_bytes, bytes):
- return b""
+ return path_or_bytes
if isinstance(path_or_bytes, (str, Path)):
if not Path(path_or_bytes).is_file():
logger.error(f"{path_or_bytes} is not exist.")