Spaces:
Runtime error
Runtime error
Update dataloader/misc.py
Browse files- dataloader/misc.py +4 -4
dataloader/misc.py
CHANGED
|
@@ -11,7 +11,7 @@ import numpy as np
|
|
| 11 |
import os
|
| 12 |
import sys
|
| 13 |
import librosa
|
| 14 |
-
import mimetypes
|
| 15 |
|
| 16 |
def get_file_extension(file_path):
|
| 17 |
"""
|
|
@@ -32,9 +32,9 @@ def is_audio_file(file_path):
|
|
| 32 |
if ext.replace('.','') in file_ext:
|
| 33 |
return True
|
| 34 |
|
| 35 |
-
mime_type, _ = mimetypes.guess_type(file_path)
|
| 36 |
-
if mime_type and mime_type.startswith('audio'):
|
| 37 |
-
|
| 38 |
return False
|
| 39 |
|
| 40 |
def read_and_config_file(args, input_path, decode=0):
|
|
|
|
| 11 |
import os
|
| 12 |
import sys
|
| 13 |
import librosa
|
| 14 |
+
#import mimetypes
|
| 15 |
|
| 16 |
def get_file_extension(file_path):
|
| 17 |
"""
|
|
|
|
| 32 |
if ext.replace('.','') in file_ext:
|
| 33 |
return True
|
| 34 |
|
| 35 |
+
#mime_type, _ = mimetypes.guess_type(file_path)
|
| 36 |
+
#if mime_type and mime_type.startswith('audio'):
|
| 37 |
+
# return True
|
| 38 |
return False
|
| 39 |
|
| 40 |
def read_and_config_file(args, input_path, decode=0):
|