summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--become_yukarin/data_struct.py2
-rw-r--r--scripts/process.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/become_yukarin/data_struct.py b/become_yukarin/data_struct.py
index 6597d0d..4474331 100644
--- a/become_yukarin/data_struct.py
+++ b/become_yukarin/data_struct.py
@@ -43,7 +43,7 @@ class AcousticFeature(NamedTuple):
spectrogram=self.spectrogram.astype(dtype),
aperiodicity=self.aperiodicity.astype(dtype),
mfcc=self.mfcc.astype(dtype),
- voiced=self.voiced.astype(dtype),
+ voiced=self.voiced,
)
def validate(self):
diff --git a/scripts/process.py b/scripts/process.py
index 31da6aa..8f3473c 100644
--- a/scripts/process.py
+++ b/scripts/process.py
@@ -10,6 +10,7 @@ import numpy
from become_yukarin import AcousticConverter
from become_yukarin import SuperResolution
+from become_yukarin import VoiceChanger
from become_yukarin.config.config import create_from_json as create_conv_config
from become_yukarin.config.sr_config import create_from_json as create_sr_config
from become_yukarin.dataset.dataset import AcousticFeatureProcess
@@ -68,9 +69,10 @@ def process(p: Path, acoustic_converter: AcousticConverter, super_resolution: Su
input_wave = acoustic_converter._wave_process(str(p), test=True)
input_feature = acoustic_converter._feature_process(input_wave, test=True)
converted_feature = acoustic_converter.convert_to_feature(input=input_feature, out_sampling_rate=param.voice_param.sample_rate)
- # converted_feature.f0 = input_feature.f0
+ # # converted_feature.f0 = input_feature.f0
+
+ wave = super_resolution(converted_feature.spectrogram.astype(numpy.float64), acoustic_feature=converted_feature, sampling_rate=param.voice_param.sample_rate)
- wave = super_resolution(converted_feature.spectrogram, acoustic_feature=converted_feature, sampling_rate=param.voice_param.sample_rate)
librosa.output.write_wav(str(output / p.stem) + '.wav', wave.wave, wave.sampling_rate, norm=True)
except:
import traceback
@@ -82,6 +84,7 @@ def run():
acoustic_converter = load_acoustic_converter()
super_resolution = load_super_resolution()
+ # voice_changer = VoiceChanger(acoustic_converter: acoustic_converter, super_resolution: super_resolution)
output = output_directory.absolute()
output.mkdir(exist_ok=True)