Skip to content

Commit

Permalink
fix rustlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yosshi999 committed Oct 18, 2024
1 parent aa6ea80 commit fd8fd63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/voicevox_core/src/engine/audio_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ pub fn wav_from_s16le(pcm: &[u8], output_sampling_rate: u32, output_stereo: bool
cur.write_all(&bit_depth.to_le_bytes()).unwrap();
cur.write_all("data".as_bytes()).unwrap();
cur.write_all(&bytes_size.to_le_bytes()).unwrap();
cur.write_all(&pcm).unwrap();
cur.write_all(pcm).unwrap();
cur.into_inner()
}
14 changes: 7 additions & 7 deletions crates/voicevox_core/src/synthesizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,11 @@ pub(crate) mod blocking {
) -> Result<Vec<u8>> {
let audio = self.seekable_synthesis(audio_query, style_id, options)?;
let pcm = self.render(&audio, 0, audio.frame_length)?;
return Ok(wav_from_s16le(
Ok(wav_from_s16le(
&pcm,
audio_query.output_sampling_rate,
audio_query.output_stereo,
));
))
}

/// AquesTalk風記法からAccentPhrase (アクセント句)の配列を生成する。
Expand Down Expand Up @@ -1045,8 +1045,8 @@ pub(crate) mod blocking {
let GenerateFullIntermediateOutput { spec } = self.status.run_session(
model_id,
GenerateFullIntermediateInput {
f0: ndarray::arr1(&f0).into_shape([length, 1]).unwrap(),
phoneme: ndarray::arr1(&phoneme_vector)
f0: ndarray::arr1(f0).into_shape([length, 1]).unwrap(),
phoneme: ndarray::arr1(phoneme_vector)
.into_shape([length, phoneme_size])
.unwrap(),
speaker_id: ndarray::arr1(&[inner_voice_id.raw_id().into()]),
Expand Down Expand Up @@ -1078,12 +1078,12 @@ pub(crate) mod blocking {
let intermediate = self.generate_full_intermediate(
length,
phoneme_size,
&f0,
&phoneme_vector,
f0,
phoneme_vector,
style_id,
)?;
let output = self.render_audio_segment(intermediate, style_id)?;
return Ok(output.into_raw_vec());
Ok(output.into_raw_vec())
}
}

Expand Down

0 comments on commit fd8fd63

Please sign in to comment.