Spaces:
Running
Running
Upload 2 files
Browse files- app.py +22 -0
- character.json +94 -0
app.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
video_dir = "./videos"
|
| 4 |
+
audio_dir = "./audios"
|
| 5 |
+
|
| 6 |
+
# Ensure output directory exists
|
| 7 |
+
os.makedirs(audio_dir, exist_ok=True)
|
| 8 |
+
|
| 9 |
+
for filename in os.listdir(video_dir):
|
| 10 |
+
if filename.endswith(".mp4"):
|
| 11 |
+
video_path = os.path.join(video_dir, filename)
|
| 12 |
+
audio_filename = filename.replace(".mp4", ".wav")
|
| 13 |
+
audio_path = os.path.join(audio_dir, audio_filename)
|
| 14 |
+
|
| 15 |
+
command = f"ffmpeg -i \"{video_path}\" \"{audio_path}\" -y"
|
| 16 |
+
result = os.system(command)
|
| 17 |
+
|
| 18 |
+
if result == 0:
|
| 19 |
+
print(f"✅ Audio extracted from {filename} and saved as {audio_path}")
|
| 20 |
+
else:
|
| 21 |
+
print(f"❌ Failed to extract audio from {filename}")
|
| 22 |
+
print(f"Command used: {command}")
|
character.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Bombardiro Crocodilo": {
|
| 3 |
+
"image_path": "./assets/Bombardiro_Crocodilo.png",
|
| 4 |
+
"audio_path": "./assets/Bombardiro_Crocodilo.wav"
|
| 5 |
+
},
|
| 6 |
+
"Tralalero Tralala": {
|
| 7 |
+
"image_path": "./assets/Tralalero_Tralala.png",
|
| 8 |
+
"audio_path": "./assets/Tralalero_Tralala.wav"
|
| 9 |
+
},
|
| 10 |
+
"Bombombini Gusini": {
|
| 11 |
+
"image_path": "./assets/Bombombini_Gusini.png",
|
| 12 |
+
"audio_path": "./assets/Bombombini_Gusini.wav"
|
| 13 |
+
},
|
| 14 |
+
"Tung Tung Tung Tung Tung Tung Tung Tung Tung Sahur": {
|
| 15 |
+
"image_path": "./assets/Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Sahur.png",
|
| 16 |
+
"audio_path": "./assets/Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Sahur.wav"
|
| 17 |
+
},
|
| 18 |
+
"Brr Brr Patapim": {
|
| 19 |
+
"image_path": "./assets/Brr_Brr_Patapim.png",
|
| 20 |
+
"audio_path": "./assets/Brr_Brr_Patapim.wav"
|
| 21 |
+
},
|
| 22 |
+
"Cappuccino Assassino": {
|
| 23 |
+
"image_path": "./assets/Cappuccino_Assassino.png",
|
| 24 |
+
"audio_path": "./assets/Cappuccino_Assassino.wav"
|
| 25 |
+
},
|
| 26 |
+
"Lirili Larila": {
|
| 27 |
+
"image_path": "./assets/Lirili_Larila.png",
|
| 28 |
+
"audio_path": "./assets/Lirili_Larila.wav"
|
| 29 |
+
},
|
| 30 |
+
"Trulimero Trulichina": {
|
| 31 |
+
"image_path": "./assets/Trulimero_Trulichina.png",
|
| 32 |
+
"audio_path": "./assets/Trulimero_Trulichina.wav"
|
| 33 |
+
},
|
| 34 |
+
"Boneca Ambalabu": {
|
| 35 |
+
"image_path": "./assets/Boneca_Ambalabu.png",
|
| 36 |
+
"audio_path": "./assets/Boneca_Ambalabu.wav"
|
| 37 |
+
},
|
| 38 |
+
"Chimpanzini Bananini": {
|
| 39 |
+
"image_path": "./assets/Chimpanzini_Bananini.png",
|
| 40 |
+
"audio_path": "./assets/Chimpanzini_Bananini.wav"
|
| 41 |
+
},
|
| 42 |
+
"Bananita Dolfinita": {
|
| 43 |
+
"image_path": "./assets/Bananita_Dolfinita.png",
|
| 44 |
+
"audio_path": "./assets/Bananita_Dolfinita.wav"
|
| 45 |
+
},
|
| 46 |
+
"Bluberini Octopusini": {
|
| 47 |
+
"image_path": "./assets/Bluberini_Octopusini.png",
|
| 48 |
+
"audio_path": "./assets/Bluberini_Octopusini.wav"
|
| 49 |
+
},
|
| 50 |
+
"Bobrito Bandito": {
|
| 51 |
+
"image_path": "./assets/Bobrito_Bandito.png",
|
| 52 |
+
"audio_path": "./assets/Bobrito_Bandito.wav"
|
| 53 |
+
},
|
| 54 |
+
"Brri Brri Bicus Dicus": {
|
| 55 |
+
"image_path": "./assets/Brri_Brri_Bicus_Dicus.png",
|
| 56 |
+
"audio_path": "./assets/Brri_Brri_Bicus_Dicus.wav"
|
| 57 |
+
},
|
| 58 |
+
"Burbaloni Luliloli": {
|
| 59 |
+
"image_path": "./assets/Burbaloni_Luliloli.png",
|
| 60 |
+
"audio_path": "./assets/Burbaloni_Luliloli.wav"
|
| 61 |
+
},
|
| 62 |
+
"Chimpanzini Annasini": {
|
| 63 |
+
"image_path": "./assets/Chimpanzini_Annasini.png",
|
| 64 |
+
"audio_path": "./assets/Chimpanzini_Annasini.wav"
|
| 65 |
+
},
|
| 66 |
+
"Chimpanzini Cocosini": {
|
| 67 |
+
"image_path": "./assets/Chimpanzini_Cocosini.png",
|
| 68 |
+
"audio_path": "./assets/Chimpanzini_Cocosini.wav"
|
| 69 |
+
},
|
| 70 |
+
"Cocofanto Elefanto": {
|
| 71 |
+
"image_path": "./assets/Cocofanto_Elefanto.png",
|
| 72 |
+
"audio_path": "./assets/Cocofanto_Elefanto.wav"
|
| 73 |
+
},
|
| 74 |
+
"Frigo Camelo Buffardello": {
|
| 75 |
+
"image_path": "./assets/frigo_camelo_buffardello.png",
|
| 76 |
+
"audio_path": "./assets/frigo_camelo_buffardello.wav"
|
| 77 |
+
},
|
| 78 |
+
"Giraffe Celeste": {
|
| 79 |
+
"image_path": "./assets/Giraffe_Celeste.png",
|
| 80 |
+
"audio_path": "./assets/Giraffe_Celeste.wav"
|
| 81 |
+
},
|
| 82 |
+
"Glorbo Fruttodrillo": {
|
| 83 |
+
"image_path": "./assets/Glorbo_Fruttodrillo.png",
|
| 84 |
+
"audio_path": "./assets/Glorbo_Fruttodrillo.wav"
|
| 85 |
+
},
|
| 86 |
+
"Il Cacto Hipopotoma": {
|
| 87 |
+
"image_path": "./assets/il_cacto_hipopotoma.png",
|
| 88 |
+
"audio_path": "./assets/il_cacto_hipopotoma.wav"
|
| 89 |
+
},
|
| 90 |
+
"Trippi Troppi Troppa Trippa": {
|
| 91 |
+
"image_path": "./assets/Trippi_Troppi_Troppa_Trippa.png",
|
| 92 |
+
"audio_path": "./assets/Trippi_Troppi_Troppa_Trippa.wav"
|
| 93 |
+
}
|
| 94 |
+
}
|