Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,17 +8,18 @@ from huggingface_hub import HfApi
|
|
| 8 |
|
| 9 |
dataset = load_dataset("intersteller2887/Turing-test-dataset", split="train")
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
all_data_audio_paths = [
|
| 16 |
-
item['audio']['path'] for item in dataset
|
| 17 |
-
if item['audio']['path'].endswith(".wav") and "/data/" in item['audio']['path'].replace("\\", "/")
|
| 18 |
]
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
sample1_audio_path = next((p for p in all_data_audio_paths if p.endswith("sample1.wav")), None)
|
| 24 |
|
|
|
|
| 8 |
|
| 9 |
dataset = load_dataset("intersteller2887/Turing-test-dataset", split="train")
|
| 10 |
|
| 11 |
+
all_audio_paths = [
|
| 12 |
+
item["audio"]["path"]
|
| 13 |
+
for item in dataset
|
| 14 |
+
if item["audio"] and "path" in item["audio"]
|
|
|
|
|
|
|
|
|
|
| 15 |
]
|
| 16 |
|
| 17 |
+
print("Found audio files:")
|
| 18 |
+
for path in all_audio_paths[:5]:
|
| 19 |
+
print(path)
|
| 20 |
+
|
| 21 |
+
valid_audio_paths = [path for path in all_audio_paths if os.path.exists(path)]
|
| 22 |
+
print(f"Total valid audio files: {len(valid_audio_paths)}")
|
| 23 |
|
| 24 |
sample1_audio_path = next((p for p in all_data_audio_paths if p.endswith("sample1.wav")), None)
|
| 25 |
|