Skip to content

Commit

Permalink
mergeにdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Jan 27, 2024
1 parent e78dd4f commit 9d2b1a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/voicevox_core/src/metas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ use indexmap::{IndexMap, IndexSet};
use itertools::Itertools as _;
use serde::{Deserialize, Serialize};

/// [`speaker_uuid`]をキーとして複数の[`SpeakerMeta`]をマージする。
///
/// マージする際話者は[`speaker_order`]、スタイルは[`style_order`]をもとに安定ソートされる。
/// `speaker_order`が無い話者と`style_order`に属さないスタイルは、そうでないものよりも後ろに
/// 置かれる。
///
/// [`speaker_uuid`]: SpeakerMeta::speaker_uuid
/// [`speaker_order`]: SpeakerMeta::speaker_order
/// [`style_order`]: SpeakerMeta::style_order
pub fn merge<'a>(metas: impl IntoIterator<Item = &'a SpeakerMeta>) -> Vec<SpeakerMeta> {
return metas
.into_iter()
Expand Down

0 comments on commit 9d2b1a2

Please sign in to comment.