From 4c0cf3d0846ddac5bcdc6fd6ff8e3c82cec6b3ab Mon Sep 17 00:00:00 2001 From: Jeremiah Ticket Date: Sun, 8 Oct 2023 06:28:47 -0600 Subject: [PATCH] Added Volume and Priority settings. --- autospeak.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autospeak.pl b/autospeak.pl index 096f2f4..1ba35ce 100644 --- a/autospeak.pl +++ b/autospeak.pl @@ -43,18 +43,22 @@ sub speak_message { $summary = decode(ENCODING, $summary); $body = decode(ENCODING, $body); my $SpeechRate = Irssi::settings_get_int("speech_rate"); + my $SpeechVolume = Irssi::settings_get_int("speech_volume"); my $SpeechVoice = Irssi::settings_get_str("speech_voice"); my $SpeechModule = Irssi::settings_get_str("speech_module"); + my $SpeechPriority = Irssi::settings_get_str("speech_priority"); # Speak The Message my @spd = ("spd-say", "-P", - "message", + $SpeechPriority, "-o", $SpeechModule, "-y", $SpeechVoice, "-r", $SpeechRate, + "-i", + $SpeechVolume, "$summary $body"); system(@spd); } @@ -200,9 +204,11 @@ sub dcc_chat_message { } # Register configuration options: -Irssi::settings_add_int("autospeak", "speech_rate", 50); +Irssi::settings_add_int("autospeak", "speech_rate", 0); +Irssi::settings_add_int("autospeak", "speech_volume", 0); Irssi::settings_add_str("autospeak", "speech_voice", "en-us"); Irssi::settings_add_str("autospeak", "speech_module", "espeak-ng"); +Irssi::settings_add_str("autospeak", "speech_priority", "text"); Irssi::settings_add_bool('autospeak', 'speak_private_messages', 1); Irssi::settings_add_bool('autospeak', 'speak_public_messages', 1); Irssi::settings_add_bool('autospeak', 'speak_all_public_messages', 0);