Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- audio_features.py +6 -3
audio_features.py
CHANGED
|
@@ -15,8 +15,11 @@ from scipy import signal
|
|
| 15 |
from typing import Dict, Tuple, List
|
| 16 |
import noisereduce as nr
|
| 17 |
import torch
|
| 18 |
-
import warnings
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
warnings.filterwarnings("ignore")
|
| 22 |
|
|
@@ -418,4 +421,4 @@ class AudioFeatureExtractor:
|
|
| 418 |
if __name__ == "__main__":
|
| 419 |
extractor = AudioFeatureExtractor()
|
| 420 |
print("Audio Feature Extractor initialized successfully")
|
| 421 |
-
print("Using HNR instead of SNR for better voice quality measurement")
|
|
|
|
| 15 |
from typing import Dict, Tuple, List
|
| 16 |
import noisereduce as nr
|
| 17 |
import torch
|
| 18 |
+
import warnings
|
| 19 |
+
try:
|
| 20 |
+
from .emotion_features import EmotionFeatureExtractor
|
| 21 |
+
except ImportError:
|
| 22 |
+
from emotion_features import EmotionFeatureExtractor
|
| 23 |
|
| 24 |
warnings.filterwarnings("ignore")
|
| 25 |
|
|
|
|
| 421 |
if __name__ == "__main__":
|
| 422 |
extractor = AudioFeatureExtractor()
|
| 423 |
print("Audio Feature Extractor initialized successfully")
|
| 424 |
+
print("Using HNR instead of SNR for better voice quality measurement")
|