Skip to content

Commit

Permalink
Merge branch 'main' into change-liberate-voicevox-core
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Dec 12, 2024
2 parents ea4885e + a9d72ac commit c5617c8
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 30 deletions.
35 changes: 24 additions & 11 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const_format = "0.2.33"
derive-getters = "0.2.0"
derive-new = "0.5.9"
derive-syn-parse = "0.2.0"
derive_more = "0.99.17"
derive_more = "1.0.0"
duct = "0.13.7"
duplicate = "2.0.0"
easy-ext = "1.0.2"
Expand Down
2 changes: 1 addition & 1 deletion crates/voicevox_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ camino.workspace = true
const_format.workspace = true
derive-getters.workspace = true
derive-new.workspace = true
derive_more.workspace = true
derive_more = { workspace = true, features = ["add", "deref", "display", "from", "from_str"] }
duplicate.workspace = true
easy-ext.workspace = true
educe.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/voicevox_core/src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ enum DeviceAvailability {

#[derive(Clone, Copy, PartialEq, Debug, derive_more::Display)]
pub(crate) enum DeviceSpec {
#[display(fmt = "CPU")]
#[display("CPU")]
Cpu,

#[display(fmt = "{_0}")]
#[display("{_0}")]
Gpu(GpuSpec),
}

#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, derive_more::Display)]
pub(crate) enum GpuSpec {
#[display(fmt = "CUDA (device_id=0)")]
#[display("CUDA (device_id=0)")]
Cuda,

#[display(fmt = "DirectML (device_id=0)")]
#[display("DirectML (device_id=0)")]
Dml,
}

Expand Down
6 changes: 3 additions & 3 deletions crates/voicevox_core/src/engine/full_context_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ pub(crate) struct FullContextLabelError {

#[derive(derive_more::Display, Debug)]
enum ErrorKind {
#[display(fmt = "Open JTalkで解釈することができませんでした")]
#[display("Open JTalkで解釈することができませんでした")]
OpenJtalk,

#[display(fmt = "jlabelでラベルを解釈することができませんでした")]
#[display("jlabelでラベルを解釈することができませんでした")]
Jlabel,

#[display(fmt = "too long mora")]
#[display("too long mora")]
TooLongMora,
}

Expand Down
12 changes: 6 additions & 6 deletions crates/voicevox_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ pub(crate) struct LoadModelError {

#[derive(derive_more::Display, Debug)]
pub(crate) enum LoadModelErrorKind {
#[display(fmt = "ZIPファイルとして開くことができませんでした")]
#[display("ZIPファイルとして開くことができませんでした")]
OpenZipFile,
#[display(fmt = "`{filename}`を読み取れませんでした")]
#[display("`{filename}`を読み取れませんでした")]
ReadZipEntry { filename: String },
#[display(fmt = "モデルの形式が不正です")]
#[display("モデルの形式が不正です")]
InvalidModelFormat,
#[display(fmt = "モデル`{id}`は既に読み込まれています")]
#[display("モデル`{id}`は既に読み込まれています")]
ModelAlreadyLoaded { id: VoiceModelId },
#[display(fmt = "スタイル`{id}`は既に読み込まれています")]
#[display("スタイル`{id}`は既に読み込まれています")]
StyleAlreadyLoaded { id: StyleId },
#[display(fmt = "モデルデータを読むことができませんでした")]
#[display("モデルデータを読むことができませんでした")]
InvalidModelData,
}
6 changes: 3 additions & 3 deletions crates/voicevox_core/src/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ impl InputScalar for T {

#[derive(Clone, Copy, PartialEq, derive_more::Display)]
pub(crate) enum InputScalarKind {
#[display(fmt = "int64_t")]
#[display("int64_t")]
Int64,

#[display(fmt = "float")]
#[display("float")]
Float32,
}

Expand Down Expand Up @@ -209,7 +209,7 @@ impl OutputScalar for f32 {

#[derive(Clone, Copy, PartialEq, derive_more::Display)]
pub(crate) enum OutputScalarKind {
#[display(fmt = "float")]
#[display("float")]
Float32,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/voicevox_core_java_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
[dependencies]
android_logger.workspace = true
chrono = { workspace = true, default-features = false, features = ["clock"] }
derive_more.workspace = true
derive_more = { workspace = true, features = ["from"] }
duplicate.workspace = true
easy-ext.workspace = true
jni.workspace = true
Expand Down

0 comments on commit c5617c8

Please sign in to comment.