From d5e729aa818709bdd40be4d438ef7e6b0a81c519 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Thu, 12 Sep 2024 11:52:56 +0000 Subject: [PATCH] add link --- sbv2_bindings/Cargo.toml | 1 - sbv2_bindings/src/sbv2.rs | 11 +++++------ sbv2_core/Cargo.toml | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sbv2_bindings/Cargo.toml b/sbv2_bindings/Cargo.toml index 1fc0e85..a4968d8 100644 --- a/sbv2_bindings/Cargo.toml +++ b/sbv2_bindings/Cargo.toml @@ -10,6 +10,5 @@ crate-type = ["cdylib"] [dependencies] anyhow.workspace = true -numpy = "0.21.0" pyo3 = { version = "0.22.0", features = ["anyhow"] } sbv2_core = { version = "0.1.0", path = "../sbv2_core" } diff --git a/sbv2_bindings/src/sbv2.rs b/sbv2_bindings/src/sbv2.rs index d5c7226..1715b5d 100644 --- a/sbv2_bindings/src/sbv2.rs +++ b/sbv2_bindings/src/sbv2.rs @@ -1,20 +1,19 @@ use pyo3::prelude::*; -use sbv2_core::tts::TTSModel as BaseTTSModel; -use numpy::{convert::IntoPyArray +use sbv2_core::tts::TTSModelHolder; #[pyclass] pub struct TTSModel { - pub model: BaseTTSModel, + pub model: TTSModelHolder, } #[pymethods] impl TTSModel { #[new] - fn new(bert_model_path: &str, main_model_path: &str, style_vectors_path: &str) -> anyhow::Result { + fn new(bert_model_bytes: Vec, tokenizer_bytes: Vec) -> anyhow::Result { Ok(Self { - model: BaseTTSModel::new(bert_model_path, main_model_path, style_vectors_path)?, + model: TTSModelHolder::new(bert_model_bytes, tokenizer_bytes)?, }) } - fn get_style_vector + fn load() } \ No newline at end of file diff --git a/sbv2_core/Cargo.toml b/sbv2_core/Cargo.toml index 63badb6..b83565a 100644 --- a/sbv2_core/Cargo.toml +++ b/sbv2_core/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" license = "MIT" readme = "../README.md" repository = "https://github.com/tuna2134/sbv2-api" +documentation = "https://docs.rs/sbv2_core" [dependencies] anyhow.workspace = true