Update app.py
Browse files
app.py
CHANGED
@@ -753,14 +753,15 @@ def init_reference_audio():
|
|
753 |
logger.info(f"β
Found reference audio directory: {REFERENCE_AUDIO_DIR}")
|
754 |
|
755 |
# Log the contents to verify
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
|
|
764 |
else:
|
765 |
logger.warning(f"β οΈ Reference audio directory not found: {REFERENCE_AUDIO_DIR}")
|
766 |
except Exception as e:
|
|
|
753 |
logger.info(f"β
Found reference audio directory: {REFERENCE_AUDIO_DIR}")
|
754 |
|
755 |
# Log the contents to verify
|
756 |
+
pattern_dirs = [d for d in os.listdir(REFERENCE_AUDIO_DIR)
|
757 |
+
if os.path.isdir(os.path.join(REFERENCE_AUDIO_DIR, d))]
|
758 |
+
logger.info(f"π Found reference patterns: {pattern_dirs}")
|
759 |
+
|
760 |
+
# Check each pattern directory for wav files
|
761 |
+
for pattern_dir_name in pattern_dirs:
|
762 |
+
pattern_path = os.path.join(REFERENCE_AUDIO_DIR, pattern_dir_name)
|
763 |
+
wav_files = glob.glob(os.path.join(pattern_path, "*.wav"))
|
764 |
+
logger.info(f"π Found {len(wav_files)} wav files in {pattern_dir_name}")
|
765 |
else:
|
766 |
logger.warning(f"β οΈ Reference audio directory not found: {REFERENCE_AUDIO_DIR}")
|
767 |
except Exception as e:
|