Browse Source

modified code to remove null transcriptiosn

Martin Frébourg 2 years ago
parent
commit
b50566e7eb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      code/grid2csv.py

+ 1 - 0
code/grid2csv.py

@@ -56,6 +56,7 @@ for file in files:
     for tier in grid.get_tiers():
         for interval in tier.get_all_intervals():
             
+            if not interval[2]: continue
             #populates dataframe
             temp_dict = {'speaker_id': tier.name, 'segment_onset': (interval[0]*1000 + audio_onset),
                 'segment_offset': (interval[1]*1000 + audio_onset), 'transcription': interval[2]}