Support for Audio Files (#1416)

This commit is contained in:
Dev Khant
2024-06-12 22:55:58 +05:30
committed by GitHub
parent 1bddd46ed2
commit 08b67b4a78
10 changed files with 211 additions and 1 deletions

View File

@@ -237,6 +237,12 @@ def detect_datatype(source: Any) -> DataType:
logger.debug(f"Source of `{formatted_source}` detected as `docx`.")
return DataType.DOCX
if url.path.endswith(
(".mp3", ".mp4", ".mp2", ".aac", ".wav", ".flac", ".pcm", ".m4a", ".ogg", ".opus", ".webm")
):
logger.debug(f"Source of `{formatted_source}` detected as `audio`.")
return DataType.AUDIO
if url.path.endswith(".yaml"):
try:
response = requests.get(source)