Skip to content

Commit d37430b

Browse files
qryxiptarepan
andauthored
refactor: 音素を列挙型で表現する (#1190)
`OjtPhoneme`を解体し、AudioQueryレベルの表現の`enum Phoneme`と音素IDレベ ルの`enum PhonemeCode`に置き換える。`PhonemeCode`はさらに `OptionalConsonant`型と`MoraTail`型に分類できるようにする。 #1157 の前準備。ゆくゆくはこの`enum Phoneme`を、`(Frame)AudioQuery`自体 の表現に使うようにする。あと VOICEVOX/voicevox_engine#1004 の取り込みも 予定。 VOICEVOX/voicevox_engine#993 の考え方を一部参考にした。以下1名の許諾のも と、 #874 にのっとりMITライセンスとしてライセンスする。 - @tarepan (`is_unvoiced_mora_tail`というメソッドを生やす考え方) Co-authored-by: tarepan <[email protected]>
1 parent ee2ca83 commit d37430b

File tree

7 files changed

+661
-170
lines changed

7 files changed

+661
-170
lines changed

Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bindgen = "0.71.1"
1515
binstall-tar = "0.4.42"
1616
blocking = "1.6.1"
1717
boxcar = "0.2.6"
18+
bytemuck = "1.24.0"
1819
bytes = "1.7.2"
1920
camino = "1.1.9"
2021
cargo_metadata = "0.18.1"

crates/voicevox_core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ async-fs.workspace = true
2727
async-lock.workspace = true
2828
async_zip = { workspace = true, features = ["deflate"] }
2929
blocking.workspace = true
30+
bytemuck = { workspace = true, features = ["derive", "must_cast"] }
3031
camino.workspace = true
3132
const_format.workspace = true
3233
derive-getters.workspace = true

crates/voicevox_core/src/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ mod mora_list;
66
pub(crate) mod talk;
77

88
pub use self::audio_file::wav_from_s16le;
9-
pub(crate) use self::{acoustic_feature_extractor::OjtPhoneme, audio_file::to_s16le_pcm};
9+
pub(crate) use self::{acoustic_feature_extractor::PhonemeCode, audio_file::to_s16le_pcm};

0 commit comments

Comments
 (0)