Method: Mfcc::Calculator#map
- Defined in:
- lib/mfcc.rb
#map ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mfcc.rb', line 44 def map return to_enum(:map) { self.data.size || Float::Infinity } unless block_given? data = preemphasis(self.data) data = frame(data) data = data.map do |frame| frame = hamming(frame) frame = dft(frame) frame = Mfcc.magnitude(frame) frame = compress(frame) frame = dct(frame) yield frame end end |