mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-01-07 23:12:57 +00:00
format
This commit is contained in:
@@ -83,7 +83,11 @@ pub fn synthesize(
|
||||
.to_owned();
|
||||
|
||||
Ok(Array3::from_shape_vec(
|
||||
(audio_array.shape()[0], audio_array.shape()[1], audio_array.shape()[2]),
|
||||
(
|
||||
audio_array.shape()[0],
|
||||
audio_array.shape()[1],
|
||||
audio_array.shape()[2],
|
||||
),
|
||||
audio_array.into_raw_vec_and_offset().0,
|
||||
)?)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::error::{Error, Result};
|
||||
use crate::{bert, jtalk, model, nlp, norm, style, tokenizer, utils};
|
||||
use ndarray::{concatenate, s, Array, Array1, Array2, Array3, Axis};
|
||||
use hound::{SampleFormat, WavSpec, WavWriter};
|
||||
use ndarray::{concatenate, s, Array, Array1, Array2, Array3, Axis};
|
||||
use ort::Session;
|
||||
use std::io::{Cursor, Read};
|
||||
use tar::Archive;
|
||||
@@ -231,10 +231,7 @@ impl TTSModelHolder {
|
||||
}
|
||||
concatenate(
|
||||
Axis(0),
|
||||
&audios
|
||||
.iter()
|
||||
.map(|x| x.view())
|
||||
.collect::<Vec<_>>()
|
||||
&audios.iter().map(|x| x.view()).collect::<Vec<_>>(),
|
||||
)?
|
||||
} else {
|
||||
let (bert_ori, phones, tones, lang_ids) = self.parse_text(text)?;
|
||||
|
||||
Reference in New Issue
Block a user