summaryrefslogtreecommitdiff
path: root/become_yukarin/data_struct.py
diff options
context:
space:
mode:
Diffstat (limited to 'become_yukarin/data_struct.py')
-rw-r--r--become_yukarin/data_struct.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/become_yukarin/data_struct.py b/become_yukarin/data_struct.py
index 786dd7e..73b9b3b 100644
--- a/become_yukarin/data_struct.py
+++ b/become_yukarin/data_struct.py
@@ -23,7 +23,16 @@ class AcousticFeature(NamedTuple):
spectrogram=self.spectrogram.astype(dtype),
aperiodicity=self.aperiodicity.astype(dtype),
mfcc=self.mfcc.astype(dtype),
- voiced=self.mfcc.astype(dtype),
+ voiced=self.voiced.astype(dtype),
+ )
+
+ def astype_only_float(self, dtype):
+ return AcousticFeature(
+ f0=self.f0.astype(dtype),
+ spectrogram=self.spectrogram.astype(dtype),
+ aperiodicity=self.aperiodicity.astype(dtype),
+ mfcc=self.mfcc.astype(dtype),
+ voiced=self.voiced,
)
def validate(self):