Spaces:
Sleeping
Sleeping
Added catch for NoneType
Browse files- sonogram_utility.py +1 -1
sonogram_utility.py
CHANGED
|
@@ -413,7 +413,7 @@ def calcSpeakingTypes(pipeline,myAnnotation,maxTime):
|
|
| 413 |
categorySegmentList, timeSteps = pipeline.annotationToNoiseList(myAnnotation)
|
| 414 |
# [group,individual,silence], each as (start,duration)
|
| 415 |
for seg in categorySegmentList[0]:
|
| 416 |
-
if seg[0] == 'group':
|
| 417 |
mvAnnotation[seg[1]] = 'unclear'
|
| 418 |
else:
|
| 419 |
mvAnnotation[seg[1]] = seg[0]
|
|
|
|
| 413 |
categorySegmentList, timeSteps = pipeline.annotationToNoiseList(myAnnotation)
|
| 414 |
# [group,individual,silence], each as (start,duration)
|
| 415 |
for seg in categorySegmentList[0]:
|
| 416 |
+
if seg[0] == 'group' or seg[0] is None:
|
| 417 |
mvAnnotation[seg[1]] = 'unclear'
|
| 418 |
else:
|
| 419 |
mvAnnotation[seg[1]] = seg[0]
|