<commit_before>use strict;

use Getopt::Long;
use Proc::Daemon;

###
# Static object
###
my $VERSION = "0.1";
my $daemon  = Proc::Daemon->new();

###
# audioDetection Options
###
my $openHabUrl;
my $openHabItem;
my $ipCamUrl;
my $intPort         = "9554";
my $iceCastUrl;
my $iceCastLegacy   = "";
my $highpass        = "300";
my $lowpass         = "2500";
my $silenceDb       = "-30";
my $silenceSec      = "20";
my $sampleRate      = "16000";
my $pidFile         = "/tmp/audioDetection.pid";
my $daemonStart     = "";
my $daemonStop      = "";

GetOptions(
    "openHabUrl:s"      => \$openHabUrl,
    "openHabItem:s"     => \$openHabItem,
    "ipCamUrl:s"        => \$ipCamUrl,
    "intPort=i"         => \$intPort,
    "iceCastUrl:s"      => \$iceCastUrl,
    "iceCastLegacy"     => \$iceCastLegacy,
    "highpass=i"        => \$highpass,
    "lowpass=i"         => \$lowpass,
    "silenceDb=i"       => \$silenceDb,
    "silenceSec=i"      => \$silenceSec,
    "sampleRate=i"      => \$sampleRate,
    "pidFile=s"         => \$pidFile,
    "start"             => \$daemonStart,
    "stop"              => \$daemonStop,
    "version"           => sub { say("openHab-AudioDetection $VERSION"); },
    "help"              => sub { say("http://github.com/pvizeli/openHab-AudioDetection"); }
) or die("Command line error!");

###
# Deamon controll things
###
<commit_msg>update say commands<commit_after>use strict;
use v5.10;

use Getopt::Long;
use Proc::Daemon;

###
# Static object
###
my $VERSION = "0.1";
my $daemon  = Proc::Daemon->new();

###
# audioDetection Options
###
my $openHabUrl;
my $openHabItem;
my $ipCamUrl;
my $intPort         = "9554";
my $iceCastUrl;
my $iceCastLegacy   = "";
my $highpass        = "300";
my $lowpass         = "2500";
my $silenceDb       = "-30";
my $silenceSec      = "20";
my $sampleRate      = "16000";
my $pidFile         = "/tmp/audioDetection.pid";
my $daemonStart     = "";
my $daemonStop      = "";

GetOptions(
    "openHabUrl:s"      => \$openHabUrl,
    "openHabItem:s"     => \$openHabItem,
    "ipCamUrl:s"        => \$ipCamUrl,
    "intPort=i"         => \$intPort,
    "iceCastUrl:s"      => \$iceCastUrl,
    "iceCastLegacy"     => \$iceCastLegacy,
    "highpass=i"        => \$highpass,
    "lowpass=i"         => \$lowpass,
    "silenceDb=i"       => \$silenceDb,
    "silenceSec=i"      => \$silenceSec,
    "sampleRate=i"      => \$sampleRate,
    "pidFile=s"         => \$pidFile,
    "start"             => \$daemonStart,
    "stop"              => \$daemonStop,
    "version"           => sub { 
                            say("openHab-AudioDetection $VERSION");
                            exit(0);
                        },
    "help"              => sub { 
                            say("http://github.com/pvizeli/openHab-AudioDetection"); 
                            exit(0);
                        }
) or die("Command line error!");

###
# Deamon controll things
###

{'fraction_non_alphanumeric': 0.17755102040816326, 'fraction_numerical': 0.016666666666666666, 'mean_word_length': 1.9439439439439439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3170391', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1025, 'n_words': 194}