Class: NoyesJava::Preemphasizer

Inherits:
Object
  • Object
show all
Includes:
Math
Defined in:
lib/java_impl/preemphasis.rb

Instance Method Summary collapse

Methods included from Math

#dot_product, log2, max, min

Constructor Details

#initialize(factor = 0.97) ⇒ Preemphasizer



4
5
6
# File 'lib/java_impl/preemphasis.rb', line 4

def initialize factor=0.97
  @filter = Java::talkhouse.Preemphasizer.new factor
end

Instance Method Details

#<<(data) ⇒ Object



7
8
9
# File 'lib/java_impl/preemphasis.rb', line 7

def << data
  @filter.apply(data.to_java(:double)).to_a
end