update voxcpm code to support voxcpm1.5 model

This commit is contained in:
jhqxxx
2025-12-11 23:14:43 +08:00
parent 963924a1f1
commit b9947a6516
7 changed files with 68 additions and 53 deletions
+6 -6
View File
@@ -20,12 +20,12 @@ fn voxcpm1_5_generate() -> Result<()> {
// let generate = voxcpm_generate.generate_simple("太阳当空照,花儿对我笑,小鸟说早早早".to_string())?;
let generate = voxcpm_generate.generate(
"太阳当空照,花儿对我笑,小鸟说早早早".to_string(),
// Some("啥子小师叔,打狗还要看主人,你再要继续,我就是你的对手".to_string()),
// Some("./assets/audio/voice_01.wav".to_string()),
Some("一定被灰太狼给吃了,我已经为他准备好了花圈了".to_string()),
Some("./assets/audio/voice_05.wav".to_string()),
Some("啥子小师叔,打狗还要看主人,你再要继续,我就是你的对手".to_string()),
Some("./assets/audio/voice_01.wav".to_string()),
// Some("一定被灰太狼给吃了,我已经为他准备好了花圈了".to_string()),
// Some("./assets/audio/voice_05.wav".to_string()),
2,
100,
4096,
10,
2.0,
false,
@@ -50,7 +50,7 @@ fn voxcpm1_5_generate() -> Result<()> {
let i_duration = i_start.elapsed();
println!("Time elapsed in generate is: {:?}", i_duration);
save_wav(&generate, "voxcpm.wav")?;
save_wav(&generate, "voxcpm1_5.wav", 44100)?;
Ok(())
}