diff options
Diffstat (limited to 'become_yukarin/data_struct.py')
| -rw-r--r-- | become_yukarin/data_struct.py | 8 |
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), + ) |
