RHVoice updates.

This commit is contained in:
Storm Dragon
2026-04-22 22:16:11 -04:00
parent 2f45f9edab
commit 98ae684f7a
6 changed files with 196 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
/home/stormux/.local/etc/RHVoice
@@ -4,6 +4,9 @@ set -euo pipefail
scriptDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
installerPath="${1:-}"
logRoot="${STORMUX_LOG_ROOT:-${HOME}/Logs}"
logDir="${logRoot}/installs"
logFile=""
if [[ -z "${installerPath}" || ! -f "${installerPath}" ]]; then
printf 'Usage: %s installer.sh\n' "${0##*/}" >&2
@@ -21,7 +24,47 @@ fex="${fex:-}"
export installPath cache launchRoot redownload ipfsGateway fex gameName
safe_log_name() {
local name="$1"
name="${name//\//_}"
name="${name//[^[:alnum:]. _-]/_}"
printf '%s\n' "$name"
}
prune_old_logs() {
find "$logDir" -type f -name '*.log' -mtime +7 -delete 2> /dev/null || true
}
setup_logging() {
local timestamp
local safeName
mkdir -p "$logDir"
prune_old_logs
timestamp="$(date '+%Y%m%d-%H%M%S')"
safeName="$(safe_log_name "$gameName")"
logFile="${logDir}/${safeName}-${timestamp}.log"
exec > >(tee -a "$logFile") 2>&1
printf 'Installing %s [%s]\n' "$gameName" "$(date)"
printf 'Installer path: %s\n' "$installerPath"
}
finish_logging() {
local exitCode=$?
if [[ "$exitCode" -eq 0 ]]; then
printf '%s installed [%s]\n' "$gameName" "$(date)"
else
printf '%s installation failed with exit code %s [%s]\n' "$gameName" "$exitCode" "$(date)"
speak "${gameName} installation failed. Check ${logFile} for details." 1
fi
exit "$exitCode"
}
mkdir -p "${installPath}" "${cache}" "${launchRoot}"
setup_logging
trap finish_logging EXIT
# shellcheck disable=SC1091
source "${scriptDir}/game_install_functions.sh"
@@ -3,6 +3,36 @@
export installPath="${installPath:-${HOME}/.local/games}"
export fex="${fex:-}"
logRoot="${STORMUX_LOG_ROOT:-${HOME}/Logs}"
launchLogDir="${logRoot}/launches"
launchLogFile=""
safe_log_name() {
local name="$1"
name="${name//\//_}"
name="${name//[^[:alnum:]. _-]/_}"
printf '%s\n' "$name"
}
prune_old_launch_logs() {
mkdir -p "$launchLogDir"
find "$launchLogDir" -type f -name '*.log' -mtime +7 -delete 2> /dev/null || true
}
setup_launch_logging() {
local launchName="$1"
local timestamp
local safeName
prune_old_launch_logs
timestamp="$(date '+%Y%m%d-%H%M%S')"
safeName="$(safe_log_name "$launchName")"
launchLogFile="${launchLogDir}/${safeName}-${timestamp}.log"
exec > >(tee -a "$launchLogFile") 2>&1
printf 'Launching %s [%s]\n' "$launchName" "$(date)"
}
start_screen_reader() {
cthulhu &
}
@@ -155,6 +185,7 @@ find_launch_script() {
dispatch_launch_request() {
local launchScript="${STORMUX_LAUNCH_SCRIPT:-}"
local launchName="${GAME:-}"
if [[ -z "$launchScript" && -n "${GAME:-}" ]]; then
launchScript="$(find_launch_script "$GAME" || true)"
@@ -165,11 +196,18 @@ dispatch_launch_request() {
printf 'Launch script not found: %s\n' "$launchScript" >&2
return 1
fi
if [[ -z "$launchName" ]]; then
launchName="${launchScript##*/}"
launchName="${launchName%.sh}"
fi
setup_launch_logging "$launchName"
printf 'Launch script: %s\n' "$launchScript"
# shellcheck source=/dev/null
source "$launchScript"
return $?
fi
setup_launch_logging "${launchName:-unknown}"
case "${GAME:-}" in
"")
printf 'No game specified.\n' >&2
@@ -0,0 +1,64 @@
; Sample of the configuration file.
; To make changes, uncomment and edit the required parameters.
; For more information, please consult the documentation at https://github.com/RHVoice/RHVoice/tree/master/doc/en/Configuration-file.md
; The default pitch, speed, and volume.
; In the client settings they will correspond to fifty percent.
; default_pitch=1.0
; default_rate=1.0
; default_volume=1.0
; Minimum and maximum pitch values.
; min_pitch=0.5
; max_pitch=2.0
; Minimum and maximum speech rate values.
; min_rate=0.5
max_rate=5.0
; Minimum and maximum volume values.
; min_volume=0.25
; max_volume=2.0
; For this and higher speach rate values, the Sonic library is used.
; min_sonic_rate=1
; The following settings allow you to disable a specific language or voice.
; languages.english.enabled=false
; voices.elena.enabled=false
; The symbol, which in the text will indicate that the vowel after sign must receive stress.
; Applies only to Russian and Ukrainian languages.
; stress_marker=
; Punctuation mode (all, some or none).
; punctuation_mode=some
; Characters pronounced in the (some) punctuation mode.
punctuation_list=+#61;<>~@#35;$%^&*|
; Indication of capital letters when reading character by character.
; Possible values: no, word, pitch, sound
; indicate_capitals=no
; cap_pitch_factor=1.3
; In auto language switching mode, always switch to the primary language.
; when reading numbers and punctuation marks.
; prefer_primary_language=true
; Enable pseudo-English support for Russian voices.
; languages.Russian.use_pseudo_english=true
; Windows only: return numeric English ID for Esperanto.
; languages.esperanto.present_as_english=false
; Speech quality: min (maximum speed),
; standard (standard quality) or max (maximum possible quality,
; but with delays in the synthesis of long sentences).
quality=max
; List of voice profiles. The first in the profile indicates the main
; voice (it will read numbers and other text for which automatic language determining fails).
; The following are additional voices. If the profile has two voices, whose languages have common
; letters, the second will only be used when the Client will
; specifically request to use it.
voice_profiles=Aleksandr+Alan,Elena+CLB
@@ -0,0 +1,9 @@
alicia=aleesha
bifrost=buyfraust
copyparty=coppeeparty
cthulhu=kthoolu
danestange=dainstanggey
godot=guhdoe
kae=kay*
kde=kaydeee
stange=stangey
@@ -0,0 +1,41 @@
aa=dubbelaye
asus=aysus
bournemouth=bornmouth
certificate=cirtifficate
configure=kunfigure
disconnects=disconects
douche=doosh*
espeak=easpeak*
firepit=fiarpit
foliage=foalyage
freenginx=freeenginex
fyshoil=fishoil
git=ghit*
github=ghittehub
gitea=ghittee
inflatable=inflatable*
jolla=yolla
irssi=earsy
jenux=jennux
lightnin=lighttnin
mapper=mappper
messaged=mesaged
nginx=enginex
reading=reding
recognise=recognize
reconnection=reconection
reconnected=reconected
rhvoice=ahraychvoice
scarecrow=scaircrow
shit=shitt
singleplayer=singelplayer
snakebite=snaikbite
sync=sink*
teapots=teapotts
timezone=timezoan
unmodified=unmoddified
unranked=unraynked
vinux=vinnux
whatsapp=watsap
wench=wentch*
youngin=younggin*