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

- (Preemphasizer) initialize(factor = 0.97)



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

- (Object) <<(data)



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

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