delete some use

This commit is contained in:
jhqxxx
2025-10-14 20:42:03 +08:00
parent 165acf7550
commit 0fd3c7d935
6 changed files with 35 additions and 42 deletions
+21 -21
View File
@@ -22,28 +22,12 @@ fn voxcpm_generate() -> Result<()> {
let i_start = Instant::now();
// 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()),
// 2,
// 100,
// 10,
// 2.0,
// false,
// 6.0,
// )?;
// 创建prompt_cache
let _ = voxcpm_generate.build_prompt_cache(
"啥子小师叔,打狗还要看主人,你再要继续,我,就是你的对手".to_string(),
"./assets/audio/voice_01.wav".to_string(),
)?;
// 使用prompt_cache生成语音
let generate = voxcpm_generate.generate_use_prompt_cache(
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()),
2,
100,
10,
@@ -52,6 +36,22 @@ fn voxcpm_generate() -> Result<()> {
6.0,
)?;
// 创建prompt_cache
// let _ = voxcpm_generate.build_prompt_cache(
// "啥子小师叔,打狗还要看主人,你再要继续,我,就是你的对手".to_string(),
// "./assets/audio/voice_01.wav".to_string(),
// )?;
// // 使用prompt_cache生成语音
// let generate = voxcpm_generate.generate_use_prompt_cache(
// "太阳当空照,花儿对我笑,小鸟说早早早".to_string(),
// 2,
// 100,
// 10,
// 2.0,
// false,
// 6.0,
// )?;
let i_duration = i_start.elapsed();
println!("Time elapsed in generate is: {:?}", i_duration);
let _ = save_wav(&generate, "voxcpm.wav")?;