updated pipeline

This commit is contained in:
Plachta
2023-02-27 22:05:28 +08:00
parent bf7042e454
commit e90e1b86f1
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -35,6 +35,7 @@ if __name__ == "__main__":
lang = result['language'] lang = result['language']
if result['language'] not in list(lang2token.keys()): if result['language'] not in list(lang2token.keys()):
print(f"{lang} not supported, ignoring...\n") print(f"{lang} not supported, ignoring...\n")
continue
# segment audio based on segment results # segment audio based on segment results
character_name = file.rstrip(".wav").split("_")[0] character_name = file.rstrip(".wav").split("_")[0]
code = file.rstrip(".wav").split("_")[1] code = file.rstrip(".wav").split("_")[1]
+1
View File
@@ -67,6 +67,7 @@ if __name__ == "__main__":
lang, text = transcribe_one(save_path) lang, text = transcribe_one(save_path)
if lang not in list(lang2token.keys()): if lang not in list(lang2token.keys()):
print(f"{lang} not supported, ignoring\n") print(f"{lang} not supported, ignoring\n")
continue
text = lang2token[lang] + text + lang2token[lang] + "\n" text = lang2token[lang] + text + lang2token[lang] + "\n"
speaker_annos.append(save_path + "|" + speaker + "|" + text) speaker_annos.append(save_path + "|" + speaker + "|" + text)
except: except: