summaryrefslogtreecommitdiff
path: root/become_yukarin/data_struct.py
diff options
context:
space:
mode:
authorHiroshiba Kazuyuki <hihokaruta@gmail.com>2017-11-08 09:46:00 +0900
committerHiroshiba Kazuyuki <hihokaruta@gmail.com>2017-11-08 09:46:00 +0900
commit6b2bae905e59d3b8756c624e38a447786c2b9e9d (patch)
tree59104ed514a162810b02f44af31d9d3c4b00be49 /become_yukarin/data_struct.py
parent6119849270c2aed117627d7d2b060f37d1c25de4 (diff)
can convert voice
Diffstat (limited to 'become_yukarin/data_struct.py')
-rw-r--r--become_yukarin/data_struct.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/become_yukarin/data_struct.py b/become_yukarin/data_struct.py
index c215ecc..f0601a5 100644
--- a/become_yukarin/data_struct.py
+++ b/become_yukarin/data_struct.py
@@ -13,3 +13,11 @@ class AcousticFeature(NamedTuple):
spectrogram: numpy.ndarray
aperiodicity: numpy.ndarray
mfcc: numpy.ndarray
+
+ def astype(self, dtype):
+ return AcousticFeature(
+ f0=self.f0.astype(dtype),
+ spectrogram=self.spectrogram.astype(dtype),
+ aperiodicity=self.aperiodicity.astype(dtype),
+ mfcc=self.mfcc.astype(dtype),
+ )