fix voxcpm dtype bug

This commit is contained in:
jhqxxx
2026-04-25 18:47:00 +08:00
parent 001e4e00f5
commit 0d408c6d06
+3 -1
View File
@@ -376,7 +376,9 @@ impl VoxCPMModelRefact {
let audio_len = audio_mask.sum_all()?.to_scalar::<u32>()? as usize;
let context_len = audio_len.min(streaming_prefix_len - 1);
let start = audio_feat.dim(1)? - context_len;
let last_feat = audio_feat.narrow(1, start, context_len)?;
let last_feat = audio_feat
.narrow(1, start, context_len)?
.to_dtype(self.dtype)?;
pred_feat_seq.push(last_feat);
}
}