Spaces:
Runtime error
Runtime error
Update app_utils.py
Browse files- app_utils.py +7 -1
app_utils.py
CHANGED
@@ -17,6 +17,7 @@ from model import pth_model_static, pth_model_dynamic, cam, pth_processing
|
|
17 |
from face_utils import get_box, display_info
|
18 |
from config import DICT_EMO, config_data
|
19 |
from plot import statistics_plot
|
|
|
20 |
|
21 |
mp_face_mesh = mp.solutions.face_mesh
|
22 |
|
@@ -331,5 +332,10 @@ def preprocess_video_and_rank(video):
|
|
331 |
with open("local_data/data.txt",'r', encoding="utf8") as f:
|
332 |
for i in f:
|
333 |
print(i)
|
|
|
|
|
|
|
|
|
|
|
334 |
|
335 |
-
return stat,scores_str
|
|
|
17 |
from face_utils import get_box, display_info
|
18 |
from config import DICT_EMO, config_data
|
19 |
from plot import statistics_plot
|
20 |
+
from moviepy.editor import AudioFileClip
|
21 |
|
22 |
mp_face_mesh = mp.solutions.face_mesh
|
23 |
|
|
|
332 |
with open("local_data/data.txt",'r', encoding="utf8") as f:
|
333 |
for i in f:
|
334 |
print(i)
|
335 |
+
|
336 |
+
|
337 |
+
#trans the audio file
|
338 |
+
my_audio_clip = AudioFileClip(video)
|
339 |
+
my_audio_clip.write_audiofile("audio.wav")
|
340 |
|
341 |
+
return stat,scores_str,"audio.wav"
|