Phase 1 Fix: min_frames=2, edge padding, clause chunking, speed=0.92
Browse files185 unmodified lines18618718818919019125 unmodified lines217218219220221222223224225226227185 unmodified linescfg_scale: Optional[float] = None,temperature: Optional[float] = None,sway_sampling_coef: Optional[float] = None,return_waveform: bool = True,) -> Dict[str, torch.Tensor]:"""25 unmodified lines# 2. Predict durationslog_dur = self.duration_predictor(h_text, mask=text_mask)durations = torch.exp(log_dur) / speeddurations = torch.clamp(durations, min=1.0)# 3. Expand text representations respecting text_maskh_expanded, mel_lengths = expand_by_duration(h_text, durations, text_mask=text_mask, return_lengths=True)cond = h_expanded.transpose(1, 2) # (B, C, T_mel)T_mel = cond.shape[-1]185 unmodified lines18618718818919019119225 unmodified lines218219220221222223224225226227228185 unmodified linescfg_scale: Optional[float] = None,temperature: Optional[float] = None,sway_sampling_coef: Optional[float] = None,min_frames: int = 2,return_waveform: bool = True,) -> Dict[str, torch.Tensor]:"""25 unmodified lines# 2. Predict durationslog_dur = self.duration_predictor(h_text, mask=text_mask)durations = torch.exp(log_dur) / speeddurations = torch.clamp(durations, min=float(max(1, min_frames)))# 3. Expand text representations respecting text_maskh_expanded, mel_lengths = expand_by_duration(h_text, durations, text_mask=text_mask, return_lengths=True, min_frames=min_frames)cond = h_expanded.transpose(1, 2) # (B, C, T_mel)T_mel = cond.shape[-1]
models/tts_engine.py+3-2