diff --git a/sbv2_core/src/main.rs b/sbv2_core/src/main.rs index a4fc185..5b2f077 100644 --- a/sbv2_core/src/main.rs +++ b/sbv2_core/src/main.rs @@ -15,7 +15,7 @@ fn main() -> anyhow::Result<()> { tts_holder.load_sbv2file(ident, fs::read(env::var("MODEL_PATH")?)?)?; let audio = tts_holder.easy_synthesize(ident, &text, 0, tts::SynthesizeOptions::default())?; - fs::write("output.wav", &audio)?; + fs::write("output.wav", audio)?; Ok(()) } diff --git a/sbv2_core/src/tts.rs b/sbv2_core/src/tts.rs index a55c357..88409d4 100644 --- a/sbv2_core/src/tts.rs +++ b/sbv2_core/src/tts.rs @@ -213,7 +213,7 @@ impl TTSModelHolder { ) -> Result> { let style_vector = self.get_style_vector(ident, style_id, options.style_weight)?; let audio_array = if options.split_sentences { - let texts: Vec<&str> = text.split("\n").collect(); + let texts: Vec<&str> = text.split('\n').collect(); let mut audios = vec![]; for (i, t) in texts.iter().enumerate() { if t.is_empty() { @@ -252,7 +252,7 @@ impl TTSModelHolder { options.length_scale, )? }; - Ok(Self::array_to_vec(audio_array)?) + Self::array_to_vec(audio_array) } fn array_to_vec(audio_array: Array3) -> Result> { @@ -296,7 +296,7 @@ impl TTSModelHolder { sdp_ratio, length_scale, )?; - Ok(Self::array_to_vec(audio_array)?) + Self::array_to_vec(audio_array) } }