From 8112ecb297e96d20aa1aa203ae7f9886b98456ea Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sun, 26 Jan 2025 00:20:58 +0900 Subject: [PATCH] =?UTF-8?q?feat!:=20"=E8=A9=B1=E8=80=85"=20("speaker")=20?= =?UTF-8?q?=E2=86=92=20"=E3=82=AD=E3=83=A3=E3=83=A9=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=BC"=20("character")=20(#943)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ソングを見据え、エンジンの内部実装のように「キャラクター」としてしまう。 これで`speaker_uuid`と(**何故か残っている**)`speaker_id` ("話者ID")以 外、"speaker"/"話者"という表現は消える。 BREAKING-CHANGE: `SpeakerMeta` → `CharacterMeta`。 BREAKING-CHANGE: `SpeakerVersion` → `CharacterVersion`。 Refs: https://github.com/VOICEVOX/voicevox_core/pull/931#pullrequestreview-2568800808 --- crates/voicevox_core/src/lib.rs | 2 +- crates/voicevox_core/src/metas.rs | 60 +++++++++---------- crates/voicevox_core/src/status.rs | 16 ++--- crates/voicevox_core/src/voice_model.rs | 18 +++--- .../include/voicevox_core.h | 2 +- crates/voicevox_core_c_api/src/c_impls.rs | 4 +- crates/voicevox_core_c_api/src/lib.rs | 2 +- .../{SpeakerMeta.java => CharacterMeta.java} | 18 +++--- .../jp/hiroshiba/voicevoxcore/StyleMeta.java | 4 +- .../voicevoxcore/blocking/Synthesizer.java | 6 +- .../voicevoxcore/blocking/VoiceModelFile.java | 6 +- .../python/voicevox_core/__init__.py | 8 +-- .../python/voicevox_core/_models.py | 26 ++++---- .../python/voicevox_core/_rust/asyncio.pyi | 10 ++-- .../python/voicevox_core/_rust/blocking.pyi | 10 ++-- .../voicevox_core_python_api/src/convert.rs | 2 +- crates/voicevox_core_python_api/src/lib.rs | 2 +- 17 files changed, 98 insertions(+), 98 deletions(-) rename crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/{SpeakerMeta.java => CharacterMeta.java} (69%) diff --git a/crates/voicevox_core/src/lib.rs b/crates/voicevox_core/src/lib.rs index 60dadbd7f..bc5ce77d5 100644 --- a/crates/voicevox_core/src/lib.rs +++ b/crates/voicevox_core/src/lib.rs @@ -87,7 +87,7 @@ pub use self::{ devices::SupportedDevices, engine::{wav_from_s16le, AccentPhrase, AudioQuery, Mora}, error::{Error, ErrorKind}, - metas::{SpeakerMeta, SpeakerVersion, StyleId, StyleMeta, StyleType, VoiceModelMeta}, + metas::{CharacterMeta, CharacterVersion, StyleId, StyleMeta, StyleType, VoiceModelMeta}, result::Result, synthesizer::AccelerationMode, user_dict::{UserDictWord, UserDictWordType}, diff --git a/crates/voicevox_core/src/metas.rs b/crates/voicevox_core/src/metas.rs index 1fd580fb4..b74c54966 100644 --- a/crates/voicevox_core/src/metas.rs +++ b/crates/voicevox_core/src/metas.rs @@ -6,28 +6,28 @@ use itertools::Itertools as _; use serde::{Deserialize, Serialize}; use tracing::warn; -/// [`speaker_uuid`]をキーとして複数の[`SpeakerMeta`]をマージする。 +/// [`speaker_uuid`]をキーとして複数の[`CharacterMeta`]をマージする。 /// -/// マージする際話者は[`SpeakerMeta::order`]、スタイルは[`StyleMeta::order`]をもとに安定ソートされる。 -/// `order`が無い話者とスタイルは、そうでないものよりも後ろに置かれる。 +/// マージする際キャラクターは[`CharacterMeta::order`]、スタイルは[`StyleMeta::order`]をもとに安定ソートされる。 +/// `order`が無いキャラクターとスタイルは、そうでないものよりも後ろに置かれる。 /// -/// [`speaker_uuid`]: SpeakerMeta::speaker_uuid -pub fn merge<'a>(metas: impl IntoIterator) -> Vec { +/// [`speaker_uuid`]: CharacterMeta::speaker_uuid +pub fn merge<'a>(metas: impl IntoIterator) -> Vec { return metas .into_iter() - .fold(IndexMap::<_, SpeakerMeta>::new(), |mut acc, speaker| { - acc.entry(&speaker.speaker_uuid) - .and_modify(|acc| acc.styles.extend(speaker.styles.clone())) - .or_insert_with(|| speaker.clone()); + .fold(IndexMap::<_, CharacterMeta>::new(), |mut acc, character| { + acc.entry(&character.speaker_uuid) + .and_modify(|acc| acc.styles.extend(character.styles.clone())) + .or_insert_with(|| character.clone()); acc }) .into_values() - .update(|speaker| { - speaker + .update(|character| { + character .styles .sort_by_key(|&StyleMeta { order, .. }| key(order)); }) - .sorted_by_key(|&SpeakerMeta { order, .. }| key(order)) + .sorted_by_key(|&CharacterMeta { order, .. }| key(order)) .collect(); fn key(order: Option) -> impl Ord { @@ -39,9 +39,9 @@ pub fn merge<'a>(metas: impl IntoIterator) -> Vec) -> std::fmt::Result { write!(f, "{}", self.0) } } /// 音声モデルのメタ情報。 -pub type VoiceModelMeta = Vec; +pub type VoiceModelMeta = Vec; -/// **話者**(_speaker_)のメタ情報。 +/// キャラクターのメタ情報。 #[derive(Deserialize, Serialize, Clone)] #[non_exhaustive] -pub struct SpeakerMeta { - /// 話者名。 +pub struct CharacterMeta { + /// キャラクター名。 pub name: String, - /// 話者に属するスタイル。 + /// キャラクターに属するスタイル。 pub styles: Vec, - /// 話者のバージョン。 - pub version: SpeakerVersion, - /// 話者のUUID。 + /// キャラクターのバージョン。 + pub version: CharacterVersion, + /// キャラクターのUUID。 pub speaker_uuid: String, - /// 話者の順番。 + /// キャラクターの順番。 /// - /// `SpeakerMeta`の列は、この値に対して昇順に並んでいるべきである。 + /// `CharacterMeta`の列は、この値に対して昇順に並んでいるべきである。 pub order: Option, } -impl SpeakerMeta { +impl CharacterMeta { /// # Panics /// /// `speaker_uuid`が異なるときパニックする。 @@ -153,7 +153,7 @@ pub struct StyleMeta { pub r#type: StyleType, /// スタイルの順番。 /// - /// [`SpeakerMeta::styles`]は、この値に対して昇順に並んでいるべきである。 + /// [`CharacterMeta::styles`]は、この値に対して昇順に並んでいるべきである。 pub order: Option, } diff --git a/crates/voicevox_core/src/status.rs b/crates/voicevox_core/src/status.rs index e8a9b8b62..f85c092b3 100644 --- a/crates/voicevox_core/src/status.rs +++ b/crates/voicevox_core/src/status.rs @@ -19,7 +19,7 @@ use crate::{ InferenceSignature, }, manifest::{InnerVoiceId, StyleIdToInnerVoiceId}, - metas::{self, SpeakerMeta, StyleId, StyleMeta, VoiceModelMeta}, + metas::{self, CharacterMeta, StyleId, StyleMeta, VoiceModelMeta}, voice_model::{ModelBytesWithInnerVoiceIdsByDomain, VoiceModelHeader, VoiceModelId}, Result, }; @@ -163,7 +163,7 @@ impl LoadedModels { .find(|(_, LoadedModel { metas, .. })| { metas .iter() - .flat_map(|SpeakerMeta { styles, .. }| styles) + .flat_map(|CharacterMeta { styles, .. }| styles) .any(|style| style.id == style_id && D::style_types().contains(&style.r#type)) }) .ok_or(ErrorRepr::StyleNotFound { @@ -214,7 +214,7 @@ impl LoadedModels { .find(|(_, LoadedModel { metas, .. })| { metas .iter() - .flat_map(|SpeakerMeta { styles, .. }| styles) + .flat_map(|CharacterMeta { styles, .. }| styles) .any(|style| style.id == style_id && D::style_types().contains(&style.r#type)) }) .and_then( @@ -263,7 +263,7 @@ impl LoadedModels { // FIXME: https://github.com/VOICEVOX/voicevox_core/pull/761#discussion_r1590200343 - let loaded = self.speakers(); + let loaded = self.characters(); let external = model_header.metas.iter(); for (loaded, external) in iproduct!(loaded, external) { if loaded.speaker_uuid == external.speaker_uuid { @@ -275,7 +275,7 @@ impl LoadedModels { let external = model_header .metas .iter() - .flat_map(|speaker| &speaker.styles) + .flat_map(|CharacterMeta { styles, .. }| styles) .map(|&StyleMeta { id, .. }| id); if let Some((id, _)) = iproduct!(loaded, external).find(|(loaded, external)| loaded == external) @@ -310,13 +310,13 @@ impl LoadedModels { Ok(()) } - fn speakers(&self) -> impl Iterator + Clone { + fn characters(&self) -> impl Iterator + Clone { self.0.values().flat_map(|LoadedModel { metas, .. }| metas) } fn styles(&self) -> impl Iterator { - self.speakers() - .flat_map(|SpeakerMeta { styles, .. }| styles) + self.characters() + .flat_map(|CharacterMeta { styles, .. }| styles) } } diff --git a/crates/voicevox_core/src/voice_model.rs b/crates/voicevox_core/src/voice_model.rs index 9a1a24169..9f400355c 100644 --- a/crates/voicevox_core/src/voice_model.rs +++ b/crates/voicevox_core/src/voice_model.rs @@ -30,7 +30,7 @@ use crate::{ InferenceDomain, }, manifest::{Manifest, ManifestDomains, ModelFile, ModelFileType, StyleIdToInnerVoiceId}, - SpeakerMeta, StyleMeta, StyleType, VoiceModelMeta, + CharacterMeta, StyleMeta, StyleType, VoiceModelMeta, }; pub(crate) type ModelBytesWithInnerVoiceIdsByDomain = inference_domain_map_values!( @@ -530,10 +530,10 @@ impl InferenceDomainMap { /// manifestとして対応していない`StyleType`に対してエラーを発する。 /// /// `Status`はこのバリデーションを信頼し、`InferenceDomain`の不足時にパニックする。 - fn check_acceptable(&self, metas: &[SpeakerMeta]) -> std::result::Result<(), StyleType> { + fn check_acceptable(&self, metas: &[CharacterMeta]) -> std::result::Result<(), StyleType> { let err = metas .iter() - .flat_map(|SpeakerMeta { styles, .. }| styles) + .flat_map(|CharacterMeta { styles, .. }| styles) .map(|StyleMeta { r#type, .. }| *r#type) .unique() .find(|&style_type| !self.accepts(style_type)); @@ -681,7 +681,7 @@ mod tests { ExperimentalTalkManifest, FrameDecodeManifest, ManifestDomains, SingingTeacherManifest, TalkManifest, }, - SpeakerMeta, StyleType, + CharacterMeta, StyleType, }; #[rstest] @@ -702,7 +702,7 @@ mod tests { singing_teacher: Some(SingingTeacherManifest::default()), frame_decode: Some(FrameDecodeManifest::default()), }, - &[speaker(&[StyleType::Talk])], + &[character(&[StyleType::Talk])], Ok(()) )] #[case( @@ -712,7 +712,7 @@ mod tests { singing_teacher: Some(SingingTeacherManifest::default()), frame_decode: Some(FrameDecodeManifest::default()), }, - &[speaker(&[StyleType::Talk, StyleType::Sing])], + &[character(&[StyleType::Talk, StyleType::Sing])], Ok(()) )] #[case( @@ -722,19 +722,19 @@ mod tests { singing_teacher: None, frame_decode: None, }, - &[speaker(&[StyleType::Talk])], + &[character(&[StyleType::Talk])], Err(()) )] fn check_acceptable_works( #[case] manifest: &InferenceDomainMap, - #[case] metas: &[SpeakerMeta], + #[case] metas: &[CharacterMeta], #[case] expected: std::result::Result<(), ()>, ) { let actual = manifest.check_acceptable(metas).map_err(|_| ()); assert_eq!(expected, actual); } - fn speaker(style_types: &'static [StyleType]) -> SpeakerMeta { + fn character(style_types: &'static [StyleType]) -> CharacterMeta { let styles = style_types .iter() .map(|style_type| { diff --git a/crates/voicevox_core_c_api/include/voicevox_core.h b/crates/voicevox_core_c_api/include/voicevox_core.h index 0644d4dba..46da8dc12 100644 --- a/crates/voicevox_core_c_api/include/voicevox_core.h +++ b/crates/voicevox_core_c_api/include/voicevox_core.h @@ -343,7 +343,7 @@ typedef const uint8_t (*VoicevoxVoiceModelId)[16]; /** * スタイルID。 * - * VOICEVOXにおける、ある話者(_speaker_)のあるスタイル(_style_)を指す。 + * VOICEVOXにおける、あるキャラクターのあるスタイル(_style_)を指す。 */ typedef uint32_t VoicevoxStyleId; diff --git a/crates/voicevox_core_c_api/src/c_impls.rs b/crates/voicevox_core_c_api/src/c_impls.rs index 939f0ddfb..6b978edef 100644 --- a/crates/voicevox_core_c_api/src/c_impls.rs +++ b/crates/voicevox_core_c_api/src/c_impls.rs @@ -11,7 +11,7 @@ use camino::Utf8Path; use duplicate::duplicate_item; use easy_ext::ext; use ref_cast::ref_cast_custom; -use voicevox_core::{Result, SpeakerMeta, VoiceModelId}; +use voicevox_core::{CharacterMeta, Result, VoiceModelId}; use crate::{ helpers::CApiResult, @@ -132,7 +132,7 @@ impl *const VoicevoxVoiceModelFile { } } -fn metas_to_json(metas: &[SpeakerMeta]) -> CString { +fn metas_to_json(metas: &[CharacterMeta]) -> CString { let metas = serde_json::to_string(metas).expect("should not fail"); CString::new(metas).expect("should not contain NUL") } diff --git a/crates/voicevox_core_c_api/src/lib.rs b/crates/voicevox_core_c_api/src/lib.rs index e684d9a27..3019929cc 100644 --- a/crates/voicevox_core_c_api/src/lib.rs +++ b/crates/voicevox_core_c_api/src/lib.rs @@ -428,7 +428,7 @@ pub type VoicevoxVoiceModelId<'a> = &'a [u8; 16]; /// スタイルID。 /// -/// VOICEVOXにおける、ある話者(_speaker_)のあるスタイル(_style_)を指す。 +/// VOICEVOXにおける、あるキャラクターのあるスタイル(_style_)を指す。 pub type VoicevoxStyleId = u32; // TODO: cbindgenが`#[unsafe(no_mangle)]`に対応したら`#[no_mangle]`を置き換える diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/SpeakerMeta.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/CharacterMeta.java similarity index 69% rename from crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/SpeakerMeta.java rename to crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/CharacterMeta.java index c43d32a8e..0efb823dd 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/SpeakerMeta.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/CharacterMeta.java @@ -5,43 +5,43 @@ import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; -/** 話者(speaker)のメタ情報。 */ -public class SpeakerMeta { - /** 話者名。 */ +/** キャラクターのメタ情報。 */ +public class CharacterMeta { + /** キャラクター名。 */ @SerializedName("name") @Expose @Nonnull public final String name; - /** 話者に属するスタイル。 */ + /** キャラクターに属するスタイル。 */ @SerializedName("styles") @Expose @Nonnull public final StyleMeta[] styles; - /** 話者のUUID。 */ + /** キャラクターのUUID。 */ @SerializedName("speaker_uuid") @Expose @Nonnull public final String speakerUuid; - /** 話者のバージョン。 */ + /** キャラクターのバージョン。 */ @SerializedName("version") @Expose @Nonnull public final String version; /** - * 話者の順番。 + * キャラクターの順番。 * - *

{@code SpeakerMeta}の列は、この値に対して昇順に並んでいるべきである。 + *

{@code CharacterMeta}の列は、この値に対して昇順に並んでいるべきである。 */ @SerializedName("order") @Expose @Nullable public final Integer order; - private SpeakerMeta() { + private CharacterMeta() { // GSONからコンストラクトするため、このメソッドは呼ばれることは無い。 // このメソッドは@Nonnullを満たすために必要。 this.name = ""; diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/StyleMeta.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/StyleMeta.java index fc63530a4..a650ce04c 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/StyleMeta.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/StyleMeta.java @@ -25,9 +25,9 @@ public class StyleMeta { public final StyleType type; /** - * 話者の順番。 + * スタイルの順番。 * - *

{@link SpeakerMeta#styles}の列は、この値に対して昇順に並んでいるべきである。 + *

{@link CharacterMeta#styles}の列は、この値に対して昇順に並んでいるべきである。 */ @SerializedName("order") @Expose diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/Synthesizer.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/Synthesizer.java index 3acc5b17d..8f5e9f49c 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/Synthesizer.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/Synthesizer.java @@ -10,7 +10,7 @@ import jp.hiroshiba.voicevoxcore.AccelerationMode; import jp.hiroshiba.voicevoxcore.AccentPhrase; import jp.hiroshiba.voicevoxcore.AudioQuery; -import jp.hiroshiba.voicevoxcore.SpeakerMeta; +import jp.hiroshiba.voicevoxcore.CharacterMeta; import jp.hiroshiba.voicevoxcore.exceptions.InvalidModelDataException; import jp.hiroshiba.voicevoxcore.exceptions.RunModelException; import jp.hiroshiba.voicevoxcore.internal.Dll; @@ -63,10 +63,10 @@ public boolean isGpuMode() { * @return メタ情報。 */ @Nonnull - public SpeakerMeta[] metas() { + public CharacterMeta[] metas() { Gson gson = new Gson(); String metasJson = rsGetMetasJson(); - SpeakerMeta[] rawMetas = gson.fromJson(metasJson, SpeakerMeta[].class); + CharacterMeta[] rawMetas = gson.fromJson(metasJson, CharacterMeta[].class); if (rawMetas == null) { throw new NullPointerException("metas"); } diff --git a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/VoiceModelFile.java b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/VoiceModelFile.java index 15410f7d6..ebe6ac4ed 100644 --- a/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/VoiceModelFile.java +++ b/crates/voicevox_core_java_api/lib/src/main/java/jp/hiroshiba/voicevoxcore/blocking/VoiceModelFile.java @@ -4,7 +4,7 @@ import jakarta.annotation.Nonnull; import java.io.Closeable; import java.util.UUID; -import jp.hiroshiba.voicevoxcore.SpeakerMeta; +import jp.hiroshiba.voicevoxcore.CharacterMeta; import jp.hiroshiba.voicevoxcore.internal.Dll; /** 音声モデルファイル。 */ @@ -27,14 +27,14 @@ public class VoiceModelFile implements Closeable { * *

{@link #close}の後でも利用可能。 */ - @Nonnull public final SpeakerMeta[] metas; + @Nonnull public final CharacterMeta[] metas; public VoiceModelFile(String modelPath) { rsOpen(modelPath); id = rsGetId(); String metasJson = rsGetMetasJson(); Gson gson = new Gson(); - SpeakerMeta[] rawMetas = gson.fromJson(metasJson, SpeakerMeta[].class); + CharacterMeta[] rawMetas = gson.fromJson(metasJson, CharacterMeta[].class); if (rawMetas == null) { throw new RuntimeException("Failed to parse metasJson"); } diff --git a/crates/voicevox_core_python_api/python/voicevox_core/__init__.py b/crates/voicevox_core_python_api/python/voicevox_core/__init__.py index 38228c9d5..ed1b46d48 100644 --- a/crates/voicevox_core_python_api/python/voicevox_core/__init__.py +++ b/crates/voicevox_core_python_api/python/voicevox_core/__init__.py @@ -4,9 +4,9 @@ AccelerationMode, AccentPhrase, AudioQuery, + CharacterMeta, + CharacterVersion, Mora, - SpeakerMeta, - SpeakerVersion, StyleId, StyleMeta, StyleType, @@ -50,6 +50,8 @@ "AudioQuery", "asyncio", "blocking", + "CharacterMeta", + "CharacterVersion", "GetSupportedDevicesError", "GpuSupportError", "InitInferenceRuntimeError", @@ -65,8 +67,6 @@ "ReadZipEntryError", "RunModelError", "SaveUserDictError", - "SpeakerMeta", - "SpeakerVersion", "StyleAlreadyLoadedError", "StyleId", "StyleMeta", diff --git a/crates/voicevox_core_python_api/python/voicevox_core/_models.py b/crates/voicevox_core_python_api/python/voicevox_core/_models.py index 00730ccdb..02a8f87b3 100644 --- a/crates/voicevox_core_python_api/python/voicevox_core/_models.py +++ b/crates/voicevox_core_python_api/python/voicevox_core/_models.py @@ -16,9 +16,9 @@ x : int """ -SpeakerVersion = NewType("SpeakerVersion", str) +CharacterVersion = NewType("CharacterVersion", str) """ -**話者** (*speaker*)のバージョン。 +**キャラクター**のバージョン。 Parameters ---------- @@ -66,33 +66,33 @@ class StyleMeta: order: int | None = None """ - 話者の順番。 + スタイルの順番。 - :attr:`SpeakerMeta.styles` は、この値に対して昇順に並んでいるべきである。 + :attr:`CharacterMeta.styles` は、この値に対して昇順に並んでいるべきである。 """ @pydantic.dataclasses.dataclass -class SpeakerMeta: - """**話者** (*speaker*)のメタ情報。""" +class CharacterMeta: + """**キャラクター**のメタ情報。""" name: str - """話者名。""" + """キャラクター名。""" styles: list[StyleMeta] - """話者に属するスタイル。""" + """キャラクターに属するスタイル。""" speaker_uuid: str - """話者のUUID。""" + """キャラクターのUUID。""" - version: SpeakerVersion - """話者のバージョン。""" + version: CharacterVersion + """キャラクターのバージョン。""" order: int | None = None """ - 話者の順番。 + キャラクターの順番。 - ``SpeakerMeta`` の列は、この値に対して昇順に並んでいるべきである。 + ``CharacterMeta`` の列は、この値に対して昇順に並んでいるべきである。 """ diff --git a/crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi b/crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi index 7ae067119..cc3cde7ff 100644 --- a/crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi +++ b/crates/voicevox_core_python_api/python/voicevox_core/_rust/asyncio.pyi @@ -7,7 +7,7 @@ if TYPE_CHECKING: AccelerationMode, AccentPhrase, AudioQuery, - SpeakerMeta, + CharacterMeta, StyleId, SupportedDevices, UserDictWord, @@ -46,7 +46,7 @@ class VoiceModelFile: """ ... @property - def metas(self) -> list[SpeakerMeta]: + def metas(self) -> list[CharacterMeta]: """ メタ情報。 @@ -190,7 +190,7 @@ class Synthesizer: def is_gpu_mode(self) -> bool: """ハードウェアアクセラレーションがGPUモードかどうか。""" ... - def metas(self) -> list[SpeakerMeta]: + def metas(self) -> list[CharacterMeta]: """メタ情報。""" ... async def load_voice_model(self, model: VoiceModelFile) -> None: @@ -244,7 +244,7 @@ class Synthesizer: Returns ------- - 話者とテキストから生成された :class:`AudioQuery` 。 + スタイルとテキストから生成された :class:`AudioQuery` 。 """ ... async def create_audio_query( @@ -264,7 +264,7 @@ class Synthesizer: Returns ------- - 話者とテキストから生成された :class:`AudioQuery` 。 + スタイルとテキストから生成された :class:`AudioQuery` 。 """ ... async def create_accent_phrases_from_kana( diff --git a/crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi b/crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi index d2719e7d1..68482eddc 100644 --- a/crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi +++ b/crates/voicevox_core_python_api/python/voicevox_core/_rust/blocking.pyi @@ -7,7 +7,7 @@ if TYPE_CHECKING: AccelerationMode, AccentPhrase, AudioQuery, - SpeakerMeta, + CharacterMeta, StyleId, SupportedDevices, UserDictWord, @@ -46,7 +46,7 @@ class VoiceModelFile: """ ... @property - def metas(self) -> list[SpeakerMeta]: + def metas(self) -> list[CharacterMeta]: """ メタ情報。 @@ -190,7 +190,7 @@ class Synthesizer: def is_gpu_mode(self) -> bool: """ハードウェアアクセラレーションがGPUモードかどうか。""" ... - def metas(self) -> list[SpeakerMeta]: + def metas(self) -> list[CharacterMeta]: """メタ情報。""" ... def load_voice_model(self, model: VoiceModelFile) -> None: @@ -244,7 +244,7 @@ class Synthesizer: Returns ------- - 話者とテキストから生成された :class:`AudioQuery` 。 + スタイルとテキストから生成された :class:`AudioQuery` 。 """ ... def create_audio_query( @@ -264,7 +264,7 @@ class Synthesizer: Returns ------- - 話者とテキストから生成された :class:`AudioQuery` 。 + スタイルとテキストから生成された :class:`AudioQuery` 。 """ ... def create_accent_phrases_from_kana( diff --git a/crates/voicevox_core_python_api/src/convert.rs b/crates/voicevox_core_python_api/src/convert.rs index 7a19465ce..694d23c4a 100644 --- a/crates/voicevox_core_python_api/src/convert.rs +++ b/crates/voicevox_core_python_api/src/convert.rs @@ -62,7 +62,7 @@ pub(crate) fn to_pydantic_voice_model_meta<'py>( ) -> PyResult<&'py PyList> { let class = py .import("voicevox_core")? - .getattr("SpeakerMeta")? + .getattr("CharacterMeta")? .downcast()?; let metas = metas diff --git a/crates/voicevox_core_python_api/src/lib.rs b/crates/voicevox_core_python_api/src/lib.rs index aa7daf0ee..bc5114cea 100644 --- a/crates/voicevox_core_python_api/src/lib.rs +++ b/crates/voicevox_core_python_api/src/lib.rs @@ -263,7 +263,7 @@ impl RwLock for tokio::sync::RwLock { #[derive(Clone)] struct VoiceModelFilePyFields { id: PyObject, // `NewType("VoiceModelId", UUID)` - metas: Py, // `list[SpeakerMeta]` + metas: Py, // `list[CharacterMeta]` } #[pyfunction]