aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-07 16:13:41 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-07 16:13:41 -0400
commit3a52e3435c530c0769cbfde42d4cd9332a56b588 (patch)
tree59a69c04db1954555d16cab385d50c044aff931e
parente8c6b0c854a8f5539ba05b11a45821fe5a21100f (diff)
downloadmisc-scripts-3a52e3435c530c0769cbfde42d4cd9332a56b588.tar.gz
soxdial: wip.
-rwxr-xr-xsoxdial8
1 files changed, 7 insertions, 1 deletions
diff --git a/soxdial b/soxdial
index 7f123c2..29a66ee 100755
--- a/soxdial
+++ b/soxdial
@@ -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;
}
}