diff --git a/crates/voicevox_core/src/synthesizer.rs b/crates/voicevox_core/src/synthesizer.rs index 73b4a6696..299c2dbc0 100644 --- a/crates/voicevox_core/src/synthesizer.rs +++ b/crates/voicevox_core/src/synthesizer.rs @@ -470,6 +470,10 @@ mod inner { end: usize, ) -> Result> { // TODO: 44.1kHzなどの対応 + if (start..end).is_empty() { + // 指定区間が空のときは早期リターン + return Ok(vec![]); + } let spec_segment = crop_with_margin(audio, start..end); let wave_with_margin = self .render_audio_segment(spec_segment.to_owned(), audio.style_id)