MCPcopy Create free account
hub / github.com/modelscope/FunASR / extract_feature

Function extract_feature

funasr/utils/speaker_utils.py:113–125  ·  view source on GitHub ↗

Extract feature. Args: audio: TODO.

(audio)

Source from the content-addressed store, hash-verified

111
112
113def extract_feature(audio):
114 """Extract feature.
115
116 Args:
117 audio: TODO.
118 """
119 features = []
120 for au in audio:
121 feature = Kaldi.fbank(au.unsqueeze(0), num_mel_bins=80)
122 feature = feature - feature.mean(dim=0, keepdim=True)
123 features.append(feature.unsqueeze(0))
124 features = torch.cat(features)
125 return features
126
127
128def postprocess(

Callers

nothing calls this directly

Calls 1

fbankMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…