#[cfg(test)]
mod tests {
use candle_core::Tensor;
use pocket_tts::TTSModel;
use std::time::Instant;
#[test]
#[ignore] fn test_long_audio_prompt_memory() -> anyhow::Result<()> {
println!("Loading model...");
let model = TTSModel::load("b6369a24")?;
println!("Creating long audio input (5 minutes @ 24kHz)...");
let sample_rate = 24000;
let duration_secs = 60;
let num_samples = sample_rate * duration_secs;
let device = &model.device;
let audio = Tensor::randn(0f32, 1f32, (1, 1, num_samples), device)?;
let start = Instant::now();
println!("Starting voice state processing...");
let _state = model.get_voice_state_from_tensor(&audio)?;
let duration = start.elapsed();
println!("Processed long audio in {:.2}s", duration.as_secs_f64());
println!("Memory check passed (no panic/OOM).");
Ok(())
}
}