Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,11 +8,19 @@ import numpy as np
|
|
| 8 |
emotion_labels = {0: 'neutral', 1: 'calm', 2: 'happy', 3: 'sad', 4: 'angry', 5: 'fearful'}
|
| 9 |
|
| 10 |
def process_video_audio(video_path, audio_path):
|
| 11 |
-
|
| 12 |
-
print(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
train_visual = np.zeros([1, 120, 120, 3, 10])
|
| 14 |
train_audio_wave = np.zeros([1, 261540])
|
| 15 |
-
train_audio_cnn = np.zeros([1, 150, 512
|
|
|
|
| 16 |
|
| 17 |
mfcc = torchaudio.transforms.MFCC(n_mfcc=150, melkwargs={"n_fft": 1022, "n_mels": 150})
|
| 18 |
|
|
|
|
| 8 |
emotion_labels = {0: 'neutral', 1: 'calm', 2: 'happy', 3: 'sad', 4: 'angry', 5: 'fearful'}
|
| 9 |
|
| 10 |
def process_video_audio(video_path, audio_path):
|
| 11 |
+
|
| 12 |
+
print(video_path)
|
| 13 |
+
|
| 14 |
+
print(len(audio_path))
|
| 15 |
+
|
| 16 |
+
print(len(audio_path[0]))
|
| 17 |
+
|
| 18 |
+
audio_path = pt.tensor(audio_path[0])
|
| 19 |
+
|
| 20 |
train_visual = np.zeros([1, 120, 120, 3, 10])
|
| 21 |
train_audio_wave = np.zeros([1, 261540])
|
| 22 |
+
train_audio_cnn = np.zeros([1, 150, 512
|
| 23 |
+
, 1])
|
| 24 |
|
| 25 |
mfcc = torchaudio.transforms.MFCC(n_mfcc=150, melkwargs={"n_fft": 1022, "n_mels": 150})
|
| 26 |
|