https://github.com/linux-speakup/espeakup/pull/46

commit 38b2e158c8cd81637c1306f149bd21019182ba20
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Feb 11 00:30:26 2022 +0100

    Request systemd to prioritize espeakup
    
    So speech doesn't get choppy on a loaded system.
    
    As suggested by Nick Gawronski.

commit 7d236459a2490af584a54e712973d4efb08c9952
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Feb 11 00:31:05 2022 +0100

    Request systemd to protect espeakup from OOM
    
    Otherwise it might get killed on memory pressure.

---
 services/systemd/espeakup.service.in |    2 ++
 1 file changed, 2 insertions(+)

--- a/services/systemd/espeakup.service.in
+++ b/services/systemd/espeakup.service.in
@@ -13,6 +13,8 @@ ExecStartPre=+modprobe speakup_soft
 ExecStart=@bindir@/espeakup --default-voice=${default_voice}
 ExecReload=kill -HUP $MAINPID
 Restart=always
+Nice=-10
+OOMScoreAdjust=-900
 
 [Install]
 WantedBy=sound.target
