mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-10-29 06:26:13 +00:00
initial commit
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user