fix stop to use re

This commit is contained in:
tuna2134
2024-09-25 12:53:23 +00:00
parent 5e500b2c42
commit f79a67138f
5 changed files with 7 additions and 11 deletions

4
Cargo.lock generated
View File

@@ -1819,7 +1819,7 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "sbv2_api"
version = "0.1.0"
version = "0.2.0-alpha"
dependencies = [
"anyhow",
"axum",
@@ -1843,7 +1843,7 @@ dependencies = [
[[package]]
name = "sbv2_core"
version = "0.1.4"
version = "0.2.0-alpha"
dependencies = [
"anyhow",
"dotenvy",

View File

@@ -1,6 +1,6 @@
[package]
name = "sbv2_api"
version = "0.1.0"
version = "0.2.0-alpha"
edition = "2021"
[dependencies]
@@ -9,7 +9,7 @@ axum = "0.7.5"
dotenvy.workspace = true
env_logger.workspace = true
log = "0.4.22"
sbv2_core = { version = "0.1.3", path = "../sbv2_core" }
sbv2_core = { version = "0.2.0-alpha", path = "../sbv2_core" }
serde = { version = "1.0.210", features = ["derive"] }
tokio = { version = "1.40.0", features = ["full"] }

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.4", path = "../sbv2_core" }
sbv2_core = { version = "0.2.0-alpha", path = "../sbv2_core" }

View File

@@ -1,7 +1,7 @@
[package]
name = "sbv2_core"
description = "Style-Bert-VITSの推論ライブラリ"
version = "0.1.4"
version = "0.2.0-alpha"
edition = "2021"
license = "MIT"
readme = "../README.md"

View File

@@ -351,11 +351,7 @@ impl JTalkProcess {
let mut phones: Vec<String> = Vec::new();
for (i, label) in labels.iter().enumerate() {
let mut p3 = {
let label_text = label.to_string();
let mattched = JTALK_G2P_G_P3_PATTERN.captures(&label_text).unwrap();
mattched[1].to_string()
};
let mut p3 = label.phoneme.c;
if "AIUEO".contains(&p3) {
// 文字をlowerする
p3 = p3.to_lowercase();