From 5e9df656564a869115b4012db87cd495a5041ff3 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Wed, 20 Nov 2024 02:36:42 +0000 Subject: [PATCH] add aivmx test --- sbv2_core/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sbv2_core/src/main.rs b/sbv2_core/src/main.rs index d60311b..7651d16 100644 --- a/sbv2_core/src/main.rs +++ b/sbv2_core/src/main.rs @@ -15,7 +15,14 @@ fn main_inner() -> anyhow::Result<()> { .ok() .and_then(|x| x.parse().ok()), )?; - tts_holder.load_sbv2file(ident, fs::read(env::var("MODEL_PATH")?)?)?; + #[cfg(not(feature = "aivmx"))] + { + tts_holder.load_sbv2file(ident, fs::read(env::var("MODEL_PATH")?)?)?; + } + #[cfg(feature = "aivmx")] + { + tts_holder.load_aivmxfile(ident, fs::read(env::path("AIVMX_PATH")?)?)?; + } let audio = tts_holder.easy_synthesize(ident, &text, 0, 0, tts::SynthesizeOptions::default())?;