updated pipeline
This commit is contained in:
@@ -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]
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user