shithub: sox

Download patch

ref: ad221b90d57bcfcbcf58eceb670de3e70565a306
parent: b7e2b108be8f5ae6af487184ad2f202588b8df9e
author: robs <robs>
date: Sun May 6 15:23:04 EDT 2007

noisered doc updates

--- a/soxeffect.7
+++ b/soxeffect.7
@@ -489,28 +489,48 @@
 .SP
 .TP
 \fBnoiseprof\fR [\fIprofile-file\fR]
-Calculate a profile of the audio for use in noise reduction.
-See the description of the \fBnoisered\fR effect for details.
+Calculate a profile of the audio for use in noise reduction.  See the
+description of the \fBnoisered\fR effect for details.
 .TP
-\fBnoisered \fIprofile-file\fR [\fIthreshold\fR]
-Noise reduction filter with profiling.  This filter is moderately effective at
-removing consistent background noise such as hiss or hum.  To use it, first run
-the \fBnoiseprof\fR effect on a section of audio that ideally would
-contain silence but in fact contains noise.
-The \fBnoiseprof\fR effect will write out a noise profile
-to \fIprofile-file\fR, or to stdout if no \fIprofile-file\fR is specified.
-If there is audio output on stdout then the profile will instead be directed to
-stderr.
+\fBnoisered\fR [\fIprofile-file\fR [\fIamount\fR]]
+Reduce noise in the audio signal by profiling and filtering.  This
+effect is moderately effective at removing consistent background noise
+such as hiss or hum.  To use it, first run SoX with the \fBnoiseprof\fR
+effect on a section of audio that ideally would contain silence but in
+fact contains noise\*msuch sections are typically found at the beginning
+or the end of a recording.  \fBnoiseprof\fR will write out a noise
+profile to \fIprofile-file\fR, or to stdout if no \fIprofile-file\fR or
+if `-' is given.  E.g.
+.EX
+	sox speech.au -n trim 0 1.5 noiseprof speech.noise-profile
+.EE
+To actually remove the noise, run SoX again, this time with the \fBnoisered\fR
+effect;
+.B noisered
+will reduce noise according to a noise profile (which was generated by
+.BR noiseprof ),
+from
+.IR profile-file ,
+or from stdin if no \fIprofile-file\fR or if `-' is given.  E.g.
+.EX
+	sox speech.au cleaned.au noisered speech.noise-profile 0.3
+.EE
+How much noise should be removed is specified by
+.IR amount \*ma
+number between 0 and 1 with a default of 0\*d5.  Higher numbers will
+remove more noise but present a greater likelihood of removing wanted
+components of the audio signal.  Before replacing an original recording
+with a noise-reduced version, experiment with different
+.I amount
+values to find the optimal one for your audio; use headphones to check
+that you are happy with the results, paying particular attention to quieter
+sections of the audio.
 .SP
-To actually remove the noise, run
-SoX again with the \fInoisered\fR filter.  The
-filter needs one parameter, \fIprofile-file\fR, which contains the noise profile
-from \fBnoiseprof\fR.  \fIthreshold\fR specifies how much noise should be removed, and
-may be between 0 and 1 with a default of 0\*d5.  Higher values will remove more
-noise but present a greater likelihood of distorting the desired audio signal.
-Using headphones to check the results, experiment with different
-threshold values to find the optimal one for your audio; pay special
-attention to quieter sections.
+On most systems, the two stages\*mprofiling and reduction\*mcan be combined
+using a pipe, e.g.
+.EX
+	sox noisy.au -n trim 0 1 noiseprof | play noisy.au noisered
+.EE
 .TP
 \fBpad\fR { \fIlength\fR[\fB@\fIposition\fR] }
 Pad the audio with silence, at the beginning, the end, or any
--- a/src/noiseprof.c
+++ b/src/noiseprof.c
@@ -213,7 +213,7 @@
 
 static sox_effect_t sox_noiseprof_effect = {
   "noiseprof",
-  "Usage: noiseprof [filename]",
+  "Usage: noiseprof [profile-file]",
   SOX_EFF_MCHAN,
   sox_noiseprof_getopts,
   sox_noiseprof_start,
--- a/src/noisered.c
+++ b/src/noisered.c
@@ -346,7 +346,7 @@
 
 static sox_effect_t sox_noisered_effect = {
   "noisered",
-  "Usage: noiseprof profile-file [threshold]",
+  "Usage: noisered [profile-file [amount]]",
   SOX_EFF_MCHAN|SOX_EFF_LENGTH,
   sox_noisered_getopts,
   sox_noisered_start,