Skip to content

Commit

Permalink
jlabelを導入する (#742)
Browse files Browse the repository at this point in the history
* add jlabel

* create convert

less allocation

less unwrap

move to full_context_label

proper error handling

switch

change order

fix bugs

* remove unused code

* remove debug

* refactor

* implement workarounds

* explicitly return None

* refactor

* fmt

* use rust functionality if possible

* refactor SplitByKey

* refactor generate_moras

* refactor generate_accent_phrases
Co-authored-by: cm-ayf <[email protected]>

* better extraction from Label

* unify mora_to_text

* bring removed comment back

* create anyhow directly

* use `into`

Co-authored-by: cm-ayf <[email protected]>

* remove unnecessary as_deref

* remove as usize

* use easy_ext::ext

* use itertools::Itertools

* copy chunk_by from Rust

* fix test name

* use smallvec

* stricter condition of saturated position

* simpler match

* add test for label parser and accent phrase generator

* test openjtalk as well

* split test using rstest_reuse

* fix clippy

* remove duplicate test

---------

Co-authored-by: cm-ayf <[email protected]>
  • Loading branch information
phenylshima and cm-ayf authored Feb 26, 2024
1 parent 2cea6e3 commit cd17924
Show file tree
Hide file tree
Showing 7 changed files with 299 additions and 403 deletions.
65 changes: 38 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ indexmap = "2.0.0"
indicatif = "0.17.3"
inventory = "0.3.4"
itertools = "0.10.5"
jlabel = "0.1.2"
jni = "0.21.1"
libc = "0.2.134"
libloading = "0.7.3"
Expand All @@ -66,6 +67,7 @@ rstest_reuse = "0.6.0"
serde = "1.0.145"
serde_json = "1.0.85"
serde_with = "3.3.0"
smallvec = "1.13.1"
strum = "0.24.1"
surf = "2.3.2"
syn = "2.0.38"
Expand Down
2 changes: 2 additions & 0 deletions crates/voicevox_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fs-err = { workspace = true, features = ["tokio"] }
futures.workspace = true
indexmap = { workspace = true, features = ["serde"] }
itertools.workspace = true
jlabel.workspace = true
nanoid.workspace = true
ndarray.workspace = true
once_cell.workspace = true
Expand All @@ -33,6 +34,7 @@ rayon.workspace = true
regex.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["preserve_order"] }
smallvec.workspace = true
tempfile.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["rt"] } # FIXME: feature-gateする
Expand Down
Loading

0 comments on commit cd17924

Please sign in to comment.