skipping invalid data points
parent
3a5ce069ab
commit
e3a01169c2
|
|
@ -163,6 +163,7 @@ def analyze(
|
||||||
def get_data_points(utter_events, td_fn):
|
def get_data_points(utter_events, td_fn):
|
||||||
data_points = []
|
data_points = []
|
||||||
for evs in chunk_n(utter_events, 3):
|
for evs in chunk_n(utter_events, 3):
|
||||||
|
try:
|
||||||
assert evs[0]["Type"] == "CONV_RESULT"
|
assert evs[0]["Type"] == "CONV_RESULT"
|
||||||
assert evs[1]["Type"] == "STARTED_SPEAKING"
|
assert evs[1]["Type"] == "STARTED_SPEAKING"
|
||||||
assert evs[2]["Type"] == "STOPPED_SPEAKING"
|
assert evs[2]["Type"] == "STOPPED_SPEAKING"
|
||||||
|
|
@ -172,6 +173,9 @@ def analyze(
|
||||||
data_points.append(
|
data_points.append(
|
||||||
{"start_time": start_time, "end_time": end_time, "code": code}
|
{"start_time": start_time, "end_time": end_time, "code": code}
|
||||||
)
|
)
|
||||||
|
except AssertionError:
|
||||||
|
# skipping invalid data_points
|
||||||
|
pass
|
||||||
return data_points
|
return data_points
|
||||||
|
|
||||||
def process_call(call_obj):
|
def process_call(call_obj):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue