diff --git a/.github/workflows/mlsafir.yml b/.github/workflows/mlsafir.yml index 1d305e1..9b5874c 100644 --- a/.github/workflows/mlsafir.yml +++ b/.github/workflows/mlsafir.yml @@ -3,6 +3,7 @@ on: pull_request: paths: - src/vocoder/mlsa.rs + - src/mlpg_adjust/mlpg.rs jobs: collect: diff --git a/src/mlpg_adjust/mlpg.rs b/src/mlpg_adjust/mlpg.rs index 5b1d2fa..4e98c3c 100644 --- a/src/mlpg_adjust/mlpg.rs +++ b/src/mlpg_adjust/mlpg.rs @@ -15,7 +15,7 @@ pub struct MlpgMatrix { win_size: usize, length: usize, width: usize, - wuw: Vec>, + wuw: Vec<[f64; 3]>, wum: Vec, } @@ -25,11 +25,13 @@ impl MlpgMatrix { pub fn calc_wuw_and_wum(windows: &Windows, parameters: Vec>) -> Self { let length = parameters[0].len(); let width = windows.max_width() * 2 + 1; + assert!(width <= 3); + let mut wum = Vec::with_capacity(length); let mut wuw = Vec::with_capacity(length); for t in 0..length { - wuw.push(vec![0.0; width]); + wuw.push([0.0; 3]); wum.push(0.0); for (i, window) in windows.iter().enumerate() {