Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from pyannote.core import Annotation, Segment
|
|
| 8 |
from pyannote.audio import Pipeline
|
| 9 |
|
| 10 |
# List of all audio files to annotate
|
| 11 |
-
file_list = pd.read_excel(os.path.join(
|
| 12 |
|
| 13 |
# Initialize an empty DataFrame to store annotations
|
| 14 |
annotations = pd.DataFrame(columns=['sample_id', 'sentence', 'emotion', 'comments'])
|
|
@@ -17,7 +17,7 @@ current_index = {"index": 0} # Dictionary to allow modifying inside functions
|
|
| 17 |
def load_example(index):
|
| 18 |
"""Load the example (audio + text) by index."""
|
| 19 |
row = file_list.iloc[index]
|
| 20 |
-
audio_path = os.path.join(
|
| 21 |
print(f"Audio path: {audio_path}, Exists: {os.path.exists(audio_path)}")
|
| 22 |
sentence = row["SENTENCE"]
|
| 23 |
|
|
|
|
| 8 |
from pyannote.audio import Pipeline
|
| 9 |
|
| 10 |
# List of all audio files to annotate
|
| 11 |
+
file_list = pd.read_excel(os.path.join('combined_annotations.xlsx'))
|
| 12 |
|
| 13 |
# Initialize an empty DataFrame to store annotations
|
| 14 |
annotations = pd.DataFrame(columns=['sample_id', 'sentence', 'emotion', 'comments'])
|
|
|
|
| 17 |
def load_example(index):
|
| 18 |
"""Load the example (audio + text) by index."""
|
| 19 |
row = file_list.iloc[index]
|
| 20 |
+
audio_path = os.path.join('files_to_annotate_padded_smaller_emotion_set', row["SAMPLE ID"].split('-')[0], row["SAMPLE ID"] + '.wav')
|
| 21 |
print(f"Audio path: {audio_path}, Exists: {os.path.exists(audio_path)}")
|
| 22 |
sentence = row["SENTENCE"]
|
| 23 |
|