From 059213caa4d5cb084569d90b733df82a9f64e5e3 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 28 Aug 2024 23:19:15 -0600 Subject: [PATCH 1/4] jigasi: update jigasi configuration. --- jigasi-vosk-backend.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jigasi-vosk-backend.sh b/jigasi-vosk-backend.sh index a143a1e..ed586dc 100644 --- a/jigasi-vosk-backend.sh +++ b/jigasi-vosk-backend.sh @@ -27,17 +27,15 @@ echo '' exit_if_not_installed jitsi-meet -export DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" -export JIG_TRANSC_PASWD="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 16 | head -n1)" -JIGASI_CONFIG="/etc/jitsi/jigasi/config" -MEET_CONF="/etc/jitsi/meet/${DOMAIN}-config.js" -JIG_SIP_CONF="/etc/jitsi/jigasi/config" +DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" +JIG_TRANSC_PASWD="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 16 | head -n1)" JIG_SIP_PROP="/etc/jitsi/jigasi/sip-communicator.properties" -#JIG_TRANSC_PASWD_B64="$(echo -n "$JIG_TRANSC_PASWD" | base64)" +export DOMAIN +export JIG_TRANSC_PASWD apt-get -q2 update -# Disbale +# Disable SIP account prompt by default echo "jigasi jigasi/sip-account string ''" | debconf-set-selections echo "jigasi jigasi/sip-password password ''" | debconf-set-selections @@ -54,7 +52,7 @@ echo "6) Japanese" echo "7) Russian" echo "8) Spanish" -read -p "Enter the number corresponding to your language choice: " lang_choice +read -p "Enter the number corresponding to your language choice: " -r lang_choice case $lang_choice in 1) -- 2.34.1 From ef6252ff9febc6593b8592f3b96836f747a4feb6 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 29 Aug 2024 16:13:59 -0600 Subject: [PATCH 2/4] make docker container to restart after reboot --- jigasi-vosk-backend.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jigasi-vosk-backend.sh b/jigasi-vosk-backend.sh index ed586dc..f1d2f6a 100644 --- a/jigasi-vosk-backend.sh +++ b/jigasi-vosk-backend.sh @@ -93,7 +93,7 @@ case $lang_choice in esac # Running selected VOSK docker model. -docker run -d -p 2700:2700 ${VOSK_DOCKER_MODEL}:latest +docker run -d --restart always -p 2700:2700 ${VOSK_DOCKER_MODEL}:latest echo "Setting up Jigasi transcript with current platform..." -- 2.34.1 From d38d87e505c143989e2be089752ffc476639fc68 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 29 Aug 2024 17:53:36 -0600 Subject: [PATCH 3/4] use number on patch naming. --- jigasi-vosk-backend.sh | 6 ++++-- ...igasi-meet-config.patch => 001-jigasi-meet-config.patch} | 0 ...sip-properties.patch => 002-jigasi-sip-properties.patch} | 0 3 files changed, 4 insertions(+), 2 deletions(-) rename patches/jigasi/{jigasi-meet-config.patch => 001-jigasi-meet-config.patch} (100%) rename patches/jigasi/{jigasi-sip-properties.patch => 002-jigasi-sip-properties.patch} (100%) diff --git a/jigasi-vosk-backend.sh b/jigasi-vosk-backend.sh index f1d2f6a..2c885fc 100644 --- a/jigasi-vosk-backend.sh +++ b/jigasi-vosk-backend.sh @@ -100,13 +100,15 @@ echo "Setting up Jigasi transcript with current platform..." # Jitsi Meet echo "> Patching Jitsi Meet's config.js for Transcription support." echo " Read more at patches/jigasi/jigasi-meet-config.patch file" -envsubst < patches/jigasi/jigasi-meet-config.patch | patch --no-backup-if-mismatch -d / -p1 +envsubst < patches/jigasi/001-jigasi-meet-config.patch | \ + patch --no-backup-if-mismatch -d / -p1 # Jigasi echo "> Patching jigasi's sip-communicator.properties configuration." echo " Read more at patches/jigasi/jigasi-sip-properties.patch file" cp "$JIG_SIP_PROP" ${JIG_SIP_PROP}-dpkg-file -envsubst < patches/jigasi/jigasi-sip-properties.patch | patch --no-backup-if-mismatch -d / -p1 +envsubst < patches/jigasi/002-jigasi-sip-properties.patch | \ + patch --no-backup-if-mismatch -d / -p1 # Create transcribe user on hidden domain. prosodyctl register transcriber recorder."$DOMAIN" "$JIG_TRANSC_PASWD" diff --git a/patches/jigasi/jigasi-meet-config.patch b/patches/jigasi/001-jigasi-meet-config.patch similarity index 100% rename from patches/jigasi/jigasi-meet-config.patch rename to patches/jigasi/001-jigasi-meet-config.patch diff --git a/patches/jigasi/jigasi-sip-properties.patch b/patches/jigasi/002-jigasi-sip-properties.patch similarity index 100% rename from patches/jigasi/jigasi-sip-properties.patch rename to patches/jigasi/002-jigasi-sip-properties.patch -- 2.34.1 From 9ace8b173aff56e762580d877518f52ebbad9da5 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 29 Aug 2024 18:16:54 -0600 Subject: [PATCH 4/4] update offset lines and names --- jigasi-vosk-backend.sh | 4 ++-- patches/jigasi/001-jigasi-meet-config.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jigasi-vosk-backend.sh b/jigasi-vosk-backend.sh index 2c885fc..293bb25 100644 --- a/jigasi-vosk-backend.sh +++ b/jigasi-vosk-backend.sh @@ -99,13 +99,13 @@ echo "Setting up Jigasi transcript with current platform..." # Jitsi Meet echo "> Patching Jitsi Meet's config.js for Transcription support." -echo " Read more at patches/jigasi/jigasi-meet-config.patch file" +echo " Read more at patches/jigasi/001-jigasi-meet-config.patch file" envsubst < patches/jigasi/001-jigasi-meet-config.patch | \ patch --no-backup-if-mismatch -d / -p1 # Jigasi echo "> Patching jigasi's sip-communicator.properties configuration." -echo " Read more at patches/jigasi/jigasi-sip-properties.patch file" +echo " Read more at patches/jigasi/002-jigasi-sip-properties.patch file" cp "$JIG_SIP_PROP" ${JIG_SIP_PROP}-dpkg-file envsubst < patches/jigasi/002-jigasi-sip-properties.patch | \ patch --no-backup-if-mismatch -d / -p1 diff --git a/patches/jigasi/001-jigasi-meet-config.patch b/patches/jigasi/001-jigasi-meet-config.patch index f7ac5ac..41f5b8f 100644 --- a/patches/jigasi/001-jigasi-meet-config.patch +++ b/patches/jigasi/001-jigasi-meet-config.patch @@ -8,7 +8,7 @@ diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-confi index f412891..f704157 100644 --- a/etc/jitsi/meet/${DOMAIN}-config.js +++ b/etc/jitsi/meet/${DOMAIN}-config.js -@@ -407,9 +407,9 @@ var config = { +@@ -426,9 +426,9 @@ var config = { // autoCaptionOnRecord: false, // Transcription options. @@ -20,7 +20,7 @@ index f412891..f704157 100644 // // Translation languages. // // Available languages can be found in -@@ -424,7 +424,7 @@ var config = { +@@ -443,7 +443,7 @@ var config = { // // detected based on the environment, e.g. if the app is opened in a chrome instance which // // is using french as its default language then transcriptions for that participant will be in french. // // Defaults to true. @@ -29,7 +29,7 @@ index f412891..f704157 100644 // // Transcriber language. This settings will only work if "useAppLanguage" // // is explicitly set to false. -@@ -434,7 +434,7 @@ var config = { +@@ -453,7 +453,7 @@ var config = { // // Enables automatic turning on transcribing when recording is started // autoTranscribeOnRecord: false, -- 2.34.1