Okular + speech-dispatcher not working

garuda-inxi:

System:
Kernel: 5.16.16-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=7d76c00e-7358-4f00-a876-1486077522a6 rw [email protected]
cgroup_enable=memory swapaccount=1 quiet splash rd.udev.log_priority=3
vt.global_cursor_default=0 cgroup_enable=memory swapaccount=1
systemd.unified_cgroup_hierarchy=0 loglevel=3
Desktop: KDE Plasma 5.24.3 tk: Qt 5.15.3 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star model: B450M PRO-M2 MAX (MS-7B84) v: 2.0
serial: <superuser required> UEFI: American Megatrends v: A.70
date: 06/10/2020
CPU:
Info: model: AMD Ryzen 7 3800X bits: 64 type: MT MCP arch: Zen 2
family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 32 MiB desc: 2x16 MiB
Speed (MHz): avg: 3734 high: 4327 min/max: 2200/4559 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 3854 2: 3438
3: 3479 4: 3479 5: 3470 6: 3599 7: 3599 8: 3598 9: 4327 10: 4277 11: 4288
12: 3996 13: 3425 14: 3562 15: 3614 16: 3746 bogomips: 124801
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU117 [GeForce GTX 1650] driver: nvidia v: 510.54
alternate: nouveau,nvidia_drm pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 29:00.0 chip-ID: 10de:1f82 class-ID: 0300
Device-2: Sunplus Innovation FULL HD webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 3-1:2 chip-ID: 1bcf:2283
class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 4920x2280 s-dpi: 156 s-size: 801x371mm (31.5x14.6")
s-diag: 883mm (34.8")
Monitor-1: DP-0 pos: primary,top-right res: 3840x2160 hz: 60 dpi: 161
size: 607x345mm (23.9x13.6") diag: 698mm (27.5")
Monitor-2: DP-2 pos: bottom-l res: 1080x1920 hz: 60 dpi: 96
size: 286x509mm (11.3x20.0") diag: 584mm (23")
OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
v: 4.6.0 NVIDIA 510.54 direct render: Yes
Audio:
Device-1: NVIDIA driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s
lanes: 16 bus-ID: 29:00.1 chip-ID: 10de:10fa class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 2b:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: Sunplus Innovation FULL HD webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 3-1:2 chip-ID: 1bcf:2283
class-ID: 0102 serial: <filter>
Sound Server-1: ALSA v: k5.16.16-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 25:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp37s0 state: up speed: 100 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
bus-ID: 1-3:4 chip-ID: 0bda:8771 class-ID: e001 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:
Local Storage: total: 5.46 TiB used: 221.73 GiB (4.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SA2000M81000G
size: 931.51 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: S5Z42105
temp: 44.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: 4B6Q scheme: GPT
ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST4000DM004-2CV104
size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: HDD rpm: 5425 serial: <filter> rev: 0001 scheme: GPT
Partition:
ID-1: / raw-size: 175.78 GiB size: 175.78 GiB (100.00%)
used: 95.91 GiB (54.6%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
used: 26.7 MiB (27.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 273.44 GiB size: 273.44 GiB (100.00%)
used: 125.79 GiB (46.0%) fs: btrfs dev: /dev/nvme0n1p6 maj-min: 259:6
ID-4: /var/log raw-size: 175.78 GiB size: 175.78 GiB (100.00%)
used: 95.91 GiB (54.6%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4
ID-5: /var/tmp raw-size: 175.78 GiB size: 175.78 GiB (100.00%)
used: 95.91 GiB (54.6%) fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 15.82 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p5 maj-min: 259:5
ID-2: swap-2 type: zram size: 31.36 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 47.0 C mobo: N/A gpu: nvidia temp: 44 C
Fan Speeds (RPM): fan-1: 0 fan-2: 1737 fan-3: 0 fan-4: 0 fan-5: 0
gpu: nvidia fan: 30%
Info:
Processes: 482 Uptime: 7m wakeups: 0 Memory: 31.36 GiB
used: 6.7 GiB (21.4%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 2650 lib: 577 Shell: fish
v: 3.3.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.13
Garuda (2.5.6-2):
System install date:     2021-10-25
Last full system update: 2022-03-23 ↻
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:            fancontrol.service memavaild.service systemd-oomd.socket

I am trying to get the text to speech engine plugin on Okular working. I want it to read me PDFs! I have installed all the requirements, but I just can't get it to work! I am about to pull my hairs out :stuck_out_tongue:

What I know:

  • Speech-dispatcher sound driver, the sound driver shows up under applications on the KDE audio settings, meaning that pipewire can see it. Maybe some part of the audio driver isn't working (?), nevertheless it is at least detected
  • Speech-dispatcher service, I noticed that speech-dispatcher thanks to Okular complained that it couldn't find it, after installing speech-dispatcher it stopped complaining. I know that the service is running:
╰─λ ps aux | grep speech-dispatcher
can        31738  0.0  0.0 100104  8468 pts/3    S<l+ 11:37   0:00 /usr/lib/speech-dispatcher/speech-dispatche
r-modules/sd_espeak-ng-mbrola /etc/speech-dispatcher/modules/espeak-ng-mbrola.conf
can        31741  0.0  0.0 101168  9348 pts/3    S<l+ 11:37   0:00 /usr/lib/speech-dispatcher/speech-dispatche
r-modules/sd_espeak-ng /etc/speech-dispatcher/modules/espeak-ng.conf
can        31744  0.0  0.0  21824  5736 pts/3    S<l+ 11:37   0:00 /usr/lib/speech-dispatcher/speech-dispatche
r-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
can        31746  0.0  0.0 111940  5096 ?        S<sl 11:37   0:00 /usr/bin/speech-dispatcher --spawn --commun
ication-method unix_socket --socket-path /run/user/1000/speech-dispatcher/speechd.sock
can        45407  0.0  0.0   6672  2444 pts/1    S<+  11:44   0:00 grep --color=auto speech-dispatcher

speech-dispatcher itself also says it is running without any errors:

╰─λ speech-dispatcher -D
[Wed Mar 23 11:45:19 2022 : 767430] speechd: Speech Dispatcher 0.11.1 starting
[Wed Mar 23 11:45:19 2022 : 767478] speechd: Speech Dispatcher already running.

Speech Dispatcher already running.
  • tts engine works also: spd-say Hello! produces sound.
  • I think that the problem is on the Okular side, but it cannot be since this feature has been around for a very long time; it shouldn't break now...

Meaning I am stuck in a rationelle loop, any input to get me out will be met with open arms :smiley:

Uninsightful, but here is the Okular terminal output after attempting to start tts by pressing "Speak whole document" under "Tools" on the toolbar:

[🧱] × okular
Icon theme "adwaita" not found.
Icon theme "ubuntu-mono" not found.
Icon theme "yaru" not found.
Icon theme "Mint-X" not found.
Icon theme "elementary" not found.

Hi there, please post output of

cat /run/user/1000/speech-dispatcher/log/speech-dispatcher.log

as text.

Also, you must note that speech-dispatcher is buggy a lot of times.

1 Like