initial commit

This commit is contained in:
tuna2134
2024-09-12 12:12:21 +00:00
parent 38392f2e23
commit 2a65627414
8 changed files with 82 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
from sbv2_bindings import TTSModel
def main():
with open("../models/debert.onnx", "rb") as f:
bert = f.read()
with open("../models/tokenizer.json", "rb") as f:
tokenizer = f.read()
model = TTSModel(bert, tokenizer)
with open("../models/amitaro.sbv2", "rb") as f:
model.load_sbv2file(f.read())
style_vector = model.get_style_vector("amitaro", 0, 1.0)
with open("output.wav", "wb") as f:
f.write(model.synthesize("こんにちは", "amitaro", style_vector, 0.0, 0.5))
if __name__ == "__main__":
main()