diff options
| author | Hiroshiba Kazuyuki <hihokaruta@gmail.com> | 2017-11-08 09:46:00 +0900 |
|---|---|---|
| committer | Hiroshiba Kazuyuki <hihokaruta@gmail.com> | 2017-11-08 09:46:00 +0900 |
| commit | 6b2bae905e59d3b8756c624e38a447786c2b9e9d (patch) | |
| tree | 59104ed514a162810b02f44af31d9d3c4b00be49 /become_yukarin/data_struct.py | |
| parent | 6119849270c2aed117627d7d2b060f37d1c25de4 (diff) | |
can convert voice
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), + ) |
