Method: Arquivo::C118dir#cria_noiseprof
- Defined in:
- lib/arquivo/noise.rb
#cria_noiseprof(seg) ⇒ String
Returns perfil sonoro do silencio inicial dum segmento.
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/arquivo/noise.rb', line 113 def cria_noiseprof(seg) return unless seg[1] > opcoes[:sound] o = "tmp/noiseprof-#{File.basename(seg[0], File.extname(seg[0]))}" # obter noiseprof do silencio no inicio system "sox #{seg[0]} -n trim 0 #{seg[1]} noiseprof #{o} #{O2}" # so noiseprof validos sao devolvidos @noiseprof = File.size?(o).positive? ? o : nil end |