pub struct VoiceConfig {
pub audio: AudioConfig,
pub num_speakers: usize,
pub num_symbols: usize,
pub phoneme_type: PhonemeType,
pub phoneme_id_map: PhonemeIdMap,
pub num_languages: usize,
pub language_id_map: HashMap<String, i64>,
pub speaker_id_map: HashMap<String, i64>,
}Fields§
§audio: AudioConfig§num_speakers: usize§num_symbols: usize§phoneme_type: PhonemeType§phoneme_id_map: PhonemeIdMap§num_languages: usize§language_id_map: HashMap<String, i64>§speaker_id_map: HashMap<String, i64>Implementations§
Source§impl VoiceConfig
impl VoiceConfig
Sourcepub fn load(path: &Path) -> Result<Self, PiperError>
pub fn load(path: &Path) -> Result<Self, PiperError>
config.json を読み込む
Sourcepub fn is_multi_speaker(&self) -> bool
pub fn is_multi_speaker(&self) -> bool
モデルがマルチスピーカーか
Sourcepub fn is_multilingual(&self) -> bool
pub fn is_multilingual(&self) -> bool
モデルが多言語か
Sourcepub fn needs_prosody(&self) -> bool
pub fn needs_prosody(&self) -> bool
prosody_features テンソルが必要か (phoneme_id_map に prosody 関連キーがあるか)
Sourcepub fn resolve_config_path(
model_path: &Path,
explicit_config: Option<&Path>,
) -> Result<PathBuf, PiperError>
pub fn resolve_config_path( model_path: &Path, explicit_config: Option<&Path>, ) -> Result<PathBuf, PiperError>
config.json のフォールバック検索
- –config で明示指定
- {model}.onnx.json
- {model_dir}/config.json
Trait Implementations§
Source§impl Clone for VoiceConfig
impl Clone for VoiceConfig
Source§fn clone(&self) -> VoiceConfig
fn clone(&self) -> VoiceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VoiceConfig
impl Debug for VoiceConfig
Source§impl<'de> Deserialize<'de> for VoiceConfig
impl<'de> Deserialize<'de> for VoiceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VoiceConfig
impl RefUnwindSafe for VoiceConfig
impl Send for VoiceConfig
impl Sync for VoiceConfig
impl Unpin for VoiceConfig
impl UnsafeUnpin for VoiceConfig
impl UnwindSafe for VoiceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more