diff options
-rwxr-xr-x | soxdial | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -191,6 +191,10 @@ sub letter2number { # sox -n -d synth 0.25 sine 697 sine 1209 sine 770 sine 1477 delay 0 0 .35 .35 remix - # ...plays DTMF 1 and 6, for 0.25 sec each, with a 0.10 sec delay between them. +# ( sox -n -p synth 2 sine 350 sine 440; sox -n -p synth 2 sine 697 sine 1209 ) | sox -G -p -d +# ...plays 2 sec of dialtone followed by 2 sec of DTMF key 1. Change the -d +# to 1.wav to save to a file. Prefix it with -rXXXX -sX if needed. + sub add_digit { my $d = shift; if($d eq ',') { @@ -212,7 +216,7 @@ sub add_digit { $time += $digittime; $time += $intertime; } - warn "$SELF: added digit '$d', time now $time\n"; + warn "$SELF: added digit '$d', time now $time\n" if $verbose; } sub make_sox_cmd { @@ -290,6 +294,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } elsif(/^--?(?:t|dialtone)$/) { die "$SELF: -t/--dialtone option not yet implemented.\n"; } else { + warn "$SELF: start dial string '$_'\n" if $verbose; for (split "", $_) { my $digit = uc $_; if($extended) { @@ -300,6 +305,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } add_digit($digit); } + warn "$SELF: end dial string '$_'\n" if $verbose; } } |