|
|
@ -94,6 +94,7 @@ def finish_off_recognizer(recognizer: BuscribeRecognizer, db_cursor):
|
|
|
|
"""Flush the recognizer, commit the final line to the database and reset it."""
|
|
|
|
"""Flush the recognizer, commit the final line to the database and reset it."""
|
|
|
|
final_result_json = json.loads(recognizer.final_result()) # Flush the tubes
|
|
|
|
final_result_json = json.loads(recognizer.final_result()) # Flush the tubes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if "result" in final_result_json:
|
|
|
|
line_start_time = recognizer.segments_start_time + timedelta(seconds=final_result_json["result"][0]["start"])
|
|
|
|
line_start_time = recognizer.segments_start_time + timedelta(seconds=final_result_json["result"][0]["start"])
|
|
|
|
line_end_time = recognizer.segments_start_time + timedelta(seconds=final_result_json["result"][-1]["end"])
|
|
|
|
line_end_time = recognizer.segments_start_time + timedelta(seconds=final_result_json["result"][-1]["end"])
|
|
|
|
|
|
|
|
|
|
|
|