mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-05-14 12:50:40 +00:00
rewrite
This commit is contained in:
BIN
output.wav
BIN
output.wav
Binary file not shown.
@@ -25,11 +25,7 @@ pub fn predict(
|
||||
let output = outputs.get("output").unwrap();
|
||||
|
||||
let content = output.try_extract_tensor::<f32>()?.to_owned();
|
||||
println!("{:?}", content);
|
||||
let (data, _) = content.clone().into_raw_vec_and_offset();
|
||||
|
||||
Ok(Array2::from_shape_vec(
|
||||
(content.shape()[0], content.shape()[1]),
|
||||
content.into_raw_vec(),
|
||||
)
|
||||
.unwrap())
|
||||
Ok(Array2::from_shape_vec((content.shape()[0], content.shape()[1]), data).unwrap())
|
||||
}
|
||||
|
||||
@@ -5,12 +5,10 @@ fn main() -> error::Result<()> {
|
||||
let text = "隣の客はよくかき食う客だ";
|
||||
|
||||
let normalized_text = norm::normalize_text(text);
|
||||
println!("{}", normalized_text);
|
||||
|
||||
let jtalk = jtalk::JTalk::new()?;
|
||||
let (phones, tones, mut word2ph) = jtalk.g2p(&normalized_text)?;
|
||||
let (phones, tones, lang_ids) = nlp::cleaned_text_to_sequence(phones, tones);
|
||||
println!("{:?}", phones);
|
||||
|
||||
// add black
|
||||
let phones = utils::intersperse(&phones, 0);
|
||||
|
||||
Reference in New Issue
Block a user