Permalink
Browse files

Small fix in fomrat autodetection

  • Loading branch information...
1 parent 986d282 commit 9bccf9be449c7497837d84146dd7aae7c0cccf1b @zaf committed May 21, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 speech-recog.agi
View
@@ -74,7 +74,8 @@ my $timeout = 2;
my $intkey = "#";
# Input audio sample rate #
-my $samplerate = 0;
+# Leave blank to auto-detect #
+my $samplerate = "";
# Profanity filter #
my $pro_filter = 0;
@@ -185,7 +186,7 @@ if ($result[0] == 4) {
}
# Setting recording file format according to sample rate. #
-if ($samplerate == 0) { ($format, $samplerate) = detect_format(); }
+if (!$samplerate) { ($format, $samplerate) = detect_format(); }
elsif ($samplerate == 12000) { $format = "sln12"; }
elsif ($samplerate == 16000) { $format = "sln16"; }
elsif ($samplerate == 32000) { $format = "sln32"; }

0 comments on commit 9bccf9b

Please sign in to comment.