@@ -282,9 +282,7 @@ def analyze_alignments(self, calculate_duration_statistics=True):
282282 )
283283 .join (Utterance .file )
284284 .join (Utterance .speaker )
285- .order_by (
286- sqlalchemy .desc (Utterance .duration_deviation )
287- )
285+ .order_by (sqlalchemy .desc (Utterance .duration_deviation ))
288286 )
289287 for row in utterances :
290288 writer .writerow ([* row ])
@@ -1080,7 +1078,7 @@ def collect_alignments(self) -> None:
10801078 self .db_path .as_posix (),
10811079 "--cmd" ,
10821080 ".mode csv" ,
1083- f" .import { word_csv_path .as_posix ()} word_interval_temp" ,
1081+ f' .import " { word_csv_path .as_posix ()} " word_interval_temp' ,
10841082 ]
10851083 )
10861084 subprocess .check_call (
@@ -1089,7 +1087,7 @@ def collect_alignments(self) -> None:
10891087 self .db_path .as_posix (),
10901088 "--cmd" ,
10911089 ".mode csv" ,
1092- f" .import { phone_csv_path .as_posix ()} phone_interval_temp" ,
1090+ f' .import " { phone_csv_path .as_posix ()} " phone_interval_temp' ,
10931091 ]
10941092 )
10951093 with self .session () as session :
@@ -1419,7 +1417,7 @@ def evaluate_alignments(
14191417 to_comp = []
14201418 score_func = functools .partial (
14211419 align_phones ,
1422- silence_phone = self .optional_silence_phone ,
1420+ silence_phones = { self .optional_silence_phone } ,
14231421 custom_mapping = mapping ,
14241422 debug = config .DEBUG ,
14251423 )
@@ -1472,7 +1470,8 @@ def evaluate_alignments(
14721470 to_comp .append ((reference_phones , comparison_phones ))
14731471 with ThreadPool (1 ) as pool :
14741472 gen = pool .starmap (score_func , to_comp )
1475- for i , (score , phone_error_rate , errors ) in enumerate (gen ):
1473+ for i , result in enumerate (gen ):
1474+ score , phone_error_rate , errors = result [:3 ]
14761475 if score is None :
14771476 continue
14781477 u = indices [i ]
0 commit comments