diff options
author | B. Watson <urchlay@slackware.uk> | 2024-04-07 16:13:41 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-04-11 16:52:47 -0400 |
commit | 3a3603dd0b645a62755f8beb906e618254a6269c (patch) | |
tree | 21e9aed064c76e4187222a9d20c861b308414396 | |
parent | 6c9ec673bb3d9b95bacc375542efcb237b5f1ce3 (diff) | |
download | soxdial-3a3603dd0b645a62755f8beb906e618254a6269c.tar.gz |
soxdial: wip.
-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; } } |