use easy function

This commit is contained in:
tuna2134
2024-09-22 07:22:26 +00:00
parent 79120e4aee
commit ee4c4ab8ad
3 changed files with 8 additions and 13 deletions

View File

@@ -26,8 +26,6 @@ jobs:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
steps:
@@ -56,8 +54,6 @@ jobs:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

View File

@@ -12,4 +12,4 @@ crate-type = ["cdylib"]
anyhow.workspace = true
ndarray.workspace = true
pyo3 = { version = "0.22.0", features = ["anyhow"] }
sbv2_core = { version = "0.1.3", path = "../sbv2_core" }
sbv2_core = { version = "0.1.4", path = "../sbv2_core" }

View File

@@ -129,16 +129,15 @@ impl TTSModel {
sdp_ratio: f32,
length_scale: f32,
) -> anyhow::Result<Bound<PyBytes>> {
let (bert_ori, phones, tones, lang_ids) = self.model.parse_text(&text)?;
let data = self.model.synthesize(
let data = self.model.easy_synthesize(
ident,
bert_ori,
phones,
tones,
lang_ids,
&text,
style_vector.get(),
sdp_ratio,
length_scale,
SynthesizeOptions {
sdp_ratio,
length_scale,
..Default::default()
},
)?;
Ok(PyBytes::new_bound(py, &data))
}