From 33d467f0fe4492cc49a00adabd74b73f2f1afff2 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Fri, 13 Sep 2024 09:12:47 +0000 Subject: [PATCH] format --- sbv2_core/src/model.rs | 6 +++++- sbv2_core/src/tts.rs | 7 ++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sbv2_core/src/model.rs b/sbv2_core/src/model.rs index 173ab23..485c3f7 100644 --- a/sbv2_core/src/model.rs +++ b/sbv2_core/src/model.rs @@ -83,7 +83,11 @@ pub fn synthesize( .to_owned(); Ok(Array3::from_shape_vec( - (audio_array.shape()[0], audio_array.shape()[1], audio_array.shape()[2]), + ( + audio_array.shape()[0], + audio_array.shape()[1], + audio_array.shape()[2], + ), audio_array.into_raw_vec_and_offset().0, )?) } diff --git a/sbv2_core/src/tts.rs b/sbv2_core/src/tts.rs index 280d843..bb1d3d1 100644 --- a/sbv2_core/src/tts.rs +++ b/sbv2_core/src/tts.rs @@ -1,7 +1,7 @@ use crate::error::{Error, Result}; use crate::{bert, jtalk, model, nlp, norm, style, tokenizer, utils}; -use ndarray::{concatenate, s, Array, Array1, Array2, Array3, Axis}; use hound::{SampleFormat, WavSpec, WavWriter}; +use ndarray::{concatenate, s, Array, Array1, Array2, Array3, Axis}; use ort::Session; use std::io::{Cursor, Read}; use tar::Archive; @@ -231,10 +231,7 @@ impl TTSModelHolder { } concatenate( Axis(0), - &audios - .iter() - .map(|x| x.view()) - .collect::>() + &audios.iter().map(|x| x.view()).collect::>(), )? } else { let (bert_ori, phones, tones, lang_ids) = self.parse_text(text)?;