Update prosody_preprocessor.py
Browse files- prosody_preprocessor.py +3 -4
prosody_preprocessor.py
CHANGED
|
@@ -94,8 +94,7 @@ class ProsodyPreprocessor(FeatureExtractionMixin):
|
|
| 94 |
|
| 95 |
def extract_features(self, audio):
|
| 96 |
"""Extract F0 and intensity features"""
|
| 97 |
-
|
| 98 |
-
print('Extracting features')
|
| 99 |
audio = torch.Tensor(audio)
|
| 100 |
|
| 101 |
if audio.dim() == 1:
|
|
@@ -157,11 +156,11 @@ class ProsodyPreprocessor(FeatureExtractionMixin):
|
|
| 157 |
remove_columns=dataset.column_names
|
| 158 |
)
|
| 159 |
|
| 160 |
-
|
| 161 |
# Step 2: Group features by speaker
|
| 162 |
speaker_features = {}
|
| 163 |
for item in features_dataset:
|
| 164 |
-
|
| 165 |
speaker_id = item['speaker_id']
|
| 166 |
if speaker_id not in speaker_features:
|
| 167 |
speaker_features[speaker_id] = {'f0': [], 'intensity': []}
|
|
|
|
| 94 |
|
| 95 |
def extract_features(self, audio):
|
| 96 |
"""Extract F0 and intensity features"""
|
| 97 |
+
|
|
|
|
| 98 |
audio = torch.Tensor(audio)
|
| 99 |
|
| 100 |
if audio.dim() == 1:
|
|
|
|
| 156 |
remove_columns=dataset.column_names
|
| 157 |
)
|
| 158 |
|
| 159 |
+
|
| 160 |
# Step 2: Group features by speaker
|
| 161 |
speaker_features = {}
|
| 162 |
for item in features_dataset:
|
| 163 |
+
|
| 164 |
speaker_id = item['speaker_id']
|
| 165 |
if speaker_id not in speaker_features:
|
| 166 |
speaker_features[speaker_id] = {'f0': [], 'intensity': []}
|