mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-05-30 12:40:35 +00:00
refactor
This commit is contained in:
20
scripts/sbv2-test-bindings.py
Normal file
20
scripts/sbv2-test-bindings.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from sbv2_bindings import TTSModel
|
||||
|
||||
|
||||
def main():
|
||||
print("Loading models...")
|
||||
model = TTSModel.from_path("./models/debert.onnx", "./models/tokenizer.json")
|
||||
print("Models loaded!")
|
||||
|
||||
model.load_sbv2file_from_path("amitaro", "./models/amitaro.sbv2")
|
||||
print("All setup is done!")
|
||||
|
||||
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