Add: Support for speech synthesis in English and Chinese for ONNX inference in Non-JP-Extra models

This commit is contained in:
tsukumi
2024-09-23 07:14:44 +09:00
parent fe253611d3
commit dcca37b9a8
20 changed files with 342182 additions and 16 deletions

View File

@@ -47,7 +47,6 @@ if __name__ == "__main__":
print(f"[bold green]Tokenizer JSON saved to {tokenizer_json_path}[/bold green]")
print(Rule(characters="=", style=Style(color="blue")))
# TODO: JP, ZH は変換できるが、EN は途中で強制終了されてしまい変換できない
class ONNXBert(nn.Module):
def __init__(self):
super(ONNXBert, self).__init__()
@@ -88,8 +87,9 @@ if __name__ == "__main__":
],
output_names=["output"],
dynamic_axes={
"input_ids": {1: "batch_size"},
"attention_mask": {1: "batch_size"},
"input_ids": {0: "batch_size", 1: "sequence_length"},
"token_type_ids": {0: "batch_size", 1: "sequence_length"},
"attention_mask": {0: "batch_size", 1: "sequence_length"},
},
)
print(