fpessanha commited on
Commit
05ab087
·
verified ·
1 Parent(s): 1b50577

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(FILES_ANNOTATED, 'combined_annotations.xlsx'))
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(FILES_ANNOTATED, 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
 
 
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