Bug 32471 - elograf and nerd-dictation are not working in Gnome Wayland
Summary: elograf and nerd-dictation are not working in Gnome Wayland
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2023-10-31 11:13 CET by papoteur
Modified: 2023-12-15 20:00 CET (History)
6 users (show)

See Also:
Source RPM: elograf-0.5.3-1.mga9, nerd-dictation-git20220907-1.mga9 dotool
CVE:
Status comment: New testing version: elograf-0.5.8-1.mga9


Attachments

Description papoteur 2023-10-31 11:13:58 CET
Description of problem:
nerd-dictation uses a tool for sending what is dictated to the keyboard. By default, this is xdotool.
However, this one is working only in X11 sessions.
As a replacement, dotool works in Wayland and X11 too.
nerd-dictation needs to be updated to the latest commit to allow the usage of dotool. elograf needs also an update to allow selecting the option to work with dotool.
dotool is already packaged, but in backports repository.
Comment 1 papoteur 2023-10-31 18:05:23 CET Comment hidden (obsolete)
Comment 2 papoteur 2023-11-04 08:01:49 CET
Submitting:
elograf-0.5.5-1.mga9.noarch.rpm
nerd-dictation-git20230705-1.mga9.noarch
papoteur 2023-11-04 08:03:20 CET

Assignee: yvesbrungard => qa-bugs

Comment 3 Marja Van Waes 2023-11-04 16:52:23 CET
Should I mention in the advisory that dotool is in backports, or it the intention to move it to updates along with elograf and nerd-dictation?

Advisory not uploaded yet, this is what's stored locally now:


type: bugfix
subject: Updated elograf and nerd-dictation packages enable usage in Wayland
src:
  9:
   core:
     - elograf-0.5.5-1.mga9
     - nerd-dictation-git20230705-1.mga9
description: |
  Before, elograf and nerd-dictation could only use xdotool, which does
  not work outside X11 sessions.
  These updates allow them to use dotool, which works in Wayland and X11
references:
 - https://bugs.mageia.org/show_bug.cgi?id=32471

Source RPM: elograf-0.5.3 => elograf-0.5.3, nerd-dictation
CC: (none) => marja11

Marja Van Waes 2023-11-04 16:52:55 CET

CC: (none) => yvesbrungard

Comment 4 papoteur 2023-11-05 10:03:09 CET
Hello Marja,
Thanks for the question. I think that dotool has to move to updates_testing. I don't know if only sysadmin can do that or if I have to submit it in updates_testing.
Comment 5 Marja Van Waes 2023-11-06 18:31:22 CET
(In reply to papoteur from comment #4)
> Hello Marja,
> Thanks for the question. I think that dotool has to move to updates_testing.
> I don't know if only sysadmin can do that or if I have to submit it in
> updates_testing.

If the sysadmins didn't reply, then please bump its release and submit it in updates_testing
Comment 6 papoteur 2023-11-06 20:39:39 CET
Thus we can add 
dotool-1.3-0.git20230827.1.1.mga9
in the update.
Comment 7 Marja Van Waes 2023-11-06 22:33:42 CET
(In reply to papoteur from comment #6)
> Thus we can add 
> dotool-1.3-0.git20230827.1.1.mga9
> in the update.

The build server keeps saying it was only partially built, but also:
20231106173848.papoteur.duvel.1027512_i586.done (12 B)
20231106173848.papoteur.duvel.1027512_x86_64.done (12 B)

I uploaded the advisory from comment 3 with the addition of dotool-1.3-0.git20230827.1.1.mga9

Keywords: (none) => advisory
Source RPM: elograf-0.5.3, nerd-dictation => elograf-0.5.3, nerd-dictation, dotool

Comment 8 Len Lawrence 2023-11-16 23:42:56 CET
Mageia9, x86_64
Installed dotool and updated elograf and nerd-dictation.
$ elograf &
inserted an icon in the Mate panel.  Right clicking on that brought up a menu.  Tried configuration and managed, with a bit of a struggle to install three vosk-models from the website to a user directory, gigaspeech size for US english and a couple of small models for UK english.  Cannot take this any further (e.g. starting dictation) until a microphone is available; might be two or three days.

CC: (none) => tarazed25

Comment 9 Len Lawrence 2023-11-20 19:30:26 CET
Microphone just arrived.  Plugged it in and tried to start dictation after specifying a model path.
The terminal in which the elograf icon was launched spews out error messages which appear to complain about no models being found in the .config/... path, which was not the path that was specified.  But the .config path seems to contain exactly the same data as the other path.
Reconfigured elograf to use the default .config path but hit the same problem.
Folder '/home/lcl/.config/vosk-models/vosk-model-en-gb-0.1' does not contain model files.  This is what it does contain:
$ tree vosk-model-en-gb-0.1/
vosk-model-en-gb-0.1/
├── data
│   └── lang_test_rescore
│       ├── G.carpa
│       ├── G.fst
│       ├── phones
│       │   ├── align_lexicon.int
│       │   ├── align_lexicon.txt
│       │   ├── context_indep.csl
│       │   ├── context_indep.int
│       │   ├── context_indep.txt
│       │   ├── disambig.csl
│       │   ├── disambig.int
│       │   ├── disambig.txt
│       │   ├── extra_questions.int
│       │   ├── extra_questions.txt
│       │   ├── nonsilence.csl
│       │   ├── nonsilence.int
│       │   ├── nonsilence.txt
│       │   ├── optional_silence.csl
│       │   ├── optional_silence.int
│       │   ├── optional_silence.txt
│       │   ├── roots.int
│       │   ├── roots.txt
│       │   ├── sets.int
│       │   ├── sets.txt
│       │   ├── silence.csl
│       │   ├── silence.int
│       │   ├── silence.txt
│       │   ├── wdisambig_phones.int
│       │   ├── wdisambig.txt
│       │   ├── wdisambig_words.int
│       │   ├── word_boundary.int
│       │   └── word_boundary.txt
│       └── words.txt
├── db
│   └── etc
│       ├── en-gb.dic
│       ├── en-us.lm.gz
│       └── en-us-small.lm.gz
├── decoder-test.scp
├── decoder-test.utt2spk
├── decoder-test.wav
├── decode.sh
├── exp
│   └── tdnn
│       ├── conf
│       │   ├── ivector_extractor.conf
│       │   ├── mfcc.conf
│       │   ├── online_cmvn.conf
│       │   ├── online.conf
│       │   └── splice.conf
│       ├── final.mdl
│       ├── frame_subsampling_factor
│       ├── graph
│       │   ├── disambig_tid.int
│       │   ├── HCLG.fst
│       │   ├── num_pdfs
│       │   ├── phones.txt
│       │   └── words.txt
│       ├── ivector_extractor
│       │   ├── final.dubm
│       │   ├── final.ie
│       │   ├── final.mat
│       │   ├── global_cmvn.stats
│       │   ├── online_cmvn.conf
│       │   └── splice_opts
│       └── tree
├── local
│   ├── dictionary.py
│   ├── dict_prep.sh
│   └── int2sym.pl
└── README

Cannot understand what is going on so have to abandon this.  Turning it over to anybody who does have a clue.
Comment 10 Len Lawrence 2023-11-20 19:47:38 CET
Referring to papoteur's notes, note that $PATH does have .local/bin but that directory is empty.
Comment 11 papoteur 2023-11-20 20:14:54 CET
Hi Len,
Thanks for your tries.
I think that can be because the model downloaded is packaged in a unexpected manner.
Try to define manually a model to the path /home/lcl/.config/vosk-models/vosk-model-en-gb-0.1/data
Comment 12 Len Lawrence 2023-11-21 00:05:26 CET
Thanks for your response.  Removed the icon, edited the Elograf.conf file and restarted using the previous data.  Still no joy.

$ elograf &
<pressed button to start dictation>
 $ ERROR (VoskAPI:Model():model.cc:122) Folder '/home/lcl/.config/vosk-models/vosk-model-en-gb-0.1/data' does not contain model files. Make sure you specified the model path properly in Model constructor. If you are not sure about relative path, use absolute path specification.
Traceback (most recent call last):
  File "/usr/bin/nerd-dictation", line 1974, in <module>
    main()
.....

Still missing a trick I guess.  The actual data seems to make sense - some giant binaries (AI?) and smaller ones plus ASCII.

lcl@yildun:vosk-model-en-gb-0.1 $ cat README
Copyright 2017 AC Technologies LLC

This is a Kaldi model for UK English

Before testing adjust Kaldi root location in decoding script.

Run decode.sh to test the decoding with a wav file, make sure that file is 8khz mono PCM format.
Comment 13 Len Lawrence 2023-11-21 00:10:15 CET
Used the provided wav file but the environment does not support the test.

$ chmod +x decode.sh
$ ./decode.sh decoder-test.wav
./decode.sh: line 13: lattice-lmrescore: command not found
./decode.sh: line 9: online2-wav-nnet3-latgen-faster: command not found
./decode.sh: line 14: lattice-lmrescore-const-arpa: command not found
./decode.sh: line 15: lattice-1best: command not found
./decode.sh: line 16: lattice-align-words: command not found
./decode.sh: line 17: nbest-to-ctm: command not found
./decode.sh: line 18: local/int2sym.pl: Permission denied
Comment 14 Len Lawrence 2023-11-21 00:11:57 CET
Or, the decoding script needs to be edited.
Comment 15 Len Lawrence 2023-11-21 00:27:13 CET
There is no kaldi directory on the system but there are libkaldi files in /usr/lib64.  The README.md file implies that a toolkit needs to be built.
My general impression is that Kaldi is a red herring at this stage so not relevant to the current test.
Comment 16 Len Lawrence 2023-11-21 17:17:27 CET
Continuing the saga; up to now have been trying this out under X11 on Mate.  Switched to GNOME Classic Wayland and had trouble starting elograf.  The problem seems to be qt6 incompatibility in Wayland.
Tried the suggested environment setting:
$ export QT_QPA_PLATFORM=wayland
$ elograf &

qt.qpa.plugin: Could not find the Qt platform plugin "wayland"

Reinstalling was also suggested:
$ sudo urpme elograf 
$ sudo urpmi elograf
$ elograf &
<Hanging after a series of messages
Core dump on Return>
[2] 95841
lcl@yildun:~ $ Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

$ echo $QT_QPA_PLATFORM
wayland

So for me it neither works in Wayland nor X11.
Comment 17 Len Lawrence 2023-11-23 12:53:12 CET
Continuing from comment  16.
This is the current Elograf.conf in /home/lcl/.config/Elograf/:

[General]
Digits=0
DirectClick=1
FullSentence=0
UseSeparator=0

[Model]
name=vosk-model-en-gb-0.1

[Models]
1\language=UK English
1\location=/home/lcl/.config/vosk-models/vosk-model-en-gb-0.1/data
1\name=vosk-model-en-gb-0.1
1\size=505.0MiB
1\type=big
1\version=0.1
2\language=UK English
2\location=/home/lcl/.config/vosk-models/vosk-model-small-en-gb-0.15/data
2\name=vosk-model-small-en-gb-0.15
2\size=40.8MiB
2\type=small
2\version=0.15
3\language=US English
3\location=/home/lcl/.config/vosk-models/vosk-model-en-us-0.42-gigaspeech/data
3\name=vosk-model-en-us-0.42-gigaspeech
3\size=2.3GiB
3\type=big
3\version=0.42-gigaspeech
size=3

$ ls /home/lcl/.config/vosk-models/vosk-model-en-gb-0.1/
data/  decoder-test.scp      decoder-test.wav  exp/    README
db/    decoder-test.utt2spk  decode.sh*        local/

$ ls data
lang_test_rescore/
$ ls db
/etc
$ ls exp
tdnn/
$ ls local
dictionary.py  dict_prep.sh  int2sym.pl
papoteur 2023-11-23 12:55:31 CET

Status comment: (none) => feedback
Assignee: qa-bugs => yvesbrungard

Comment 18 papoteur 2023-11-30 20:33:10 CET
Hi Len,
The model en-gb 0.1 doesn't seem OK. Don't try anymore with it. I have reported it upstream.
I submit a new release of elograf

elograf-0.5.6-1.mga9

It fixes a problem with the usage of dotool.
Comment 19 Marja Van Waes 2023-11-30 23:02:06 CET
(In reply to papoteur from comment #18)
> Hi Len,
> The model en-gb 0.1 doesn't seem OK. Don't try anymore with it. I have
> reported it upstream.
> I submit a new release of elograf
> 
> elograf-0.5.6-1.mga9
> 
> It fixes a problem with the usage of dotool.

elograf-0.5.6-1.mga9 was already submitted to updates_testing 6 days ago.

The advisory has now been updated in SVN, with elograf-0.5.6-1.mga9.

It confuses me that you assigned this report back to yourself, Yves, were you trying to say that you'll push an even newer version of elograf, than 0.5.6 ?
Comment 20 papoteur 2023-12-01 12:17:23 CET
Hi Marja,
I forgotten to assign back to QA.
Done

Assignee: yvesbrungard => qa-bugs

Comment 21 papoteur 2023-12-04 10:29:25 CET
Submitting  elograf-0.5.7-1.mga9
Guillaume detected that using DOTOOL option withon Gnome Wayland session crashed nerd-dictation.
Added thus an option to manually set the keyboard layout for usage with DOTOOL.
Advisory has to be updated

Status comment: feedback => (none)
Keywords: advisory => (none)
Source RPM: elograf-0.5.3, nerd-dictation, dotool => elograf-0.5.7, nerd-dictation, dotool

Comment 22 Marja Van Waes 2023-12-04 12:54:04 CET
(In reply to papoteur from comment #21)
> Submitting  elograf-0.5.7-1.mga9
> Guillaume detected that using DOTOOL option withon Gnome Wayland session
> crashed nerd-dictation.
> Added thus an option to manually set the keyboard layout for usage with
> DOTOOL.
> Advisory has to be updated

Thanks for having remove the advisory keyword.
It has now been updated. Current version should be visible here, soon:
https://svnweb.mageia.org/advisories?view=revision&revision=15352

Keywords: (none) => advisory

Comment 23 papoteur 2023-12-06 10:39:45 CET
Guillaume saw that translations are not present (only in French for now).

Status comment: (none) => feedback

Comment 24 papoteur 2023-12-06 11:51:13 CET
Submitting 
elograf-0.5.8-1.mga9
which restore translation in French.

Status comment: feedback => (none)
Source RPM: elograf-0.5.7, nerd-dictation, dotool => elograf-0.5.8, nerd-dictation, dotool

Comment 25 Marja Van Waes 2023-12-06 14:41:48 CET
(In reply to papoteur from comment #24)
> Submitting 
> elograf-0.5.8-1.mga9
> which restore translation in French.

advisory in SVN has been updated
Comment 26 Marja Van Waes 2023-12-06 14:55:18 CET
The Source RPM: field is meant for the last version in (release or) updates, in other words: the version that testers should use first, after updating with the packages from updates_testing and testing again.

I used madb to find the last pushed stable versions

There is no version for dotool, because it didn't exist, yet.

Source RPM: elograf-0.5.8, nerd-dictation, dotool => elograf-0.5.3-1.mga9, nerd-dictation-git20220907-1.mga9 dotool

Marja Van Waes 2023-12-06 14:56:08 CET

Status comment: (none) => New testing version: elograf-0.5.8-1.mga9

Comment 27 Guillaume Royer 2023-12-06 22:02:12 CET
Ok, I tested today elograf-0.5.8-1.mga9 with GNOME Wayland session. 

It's allright, I can now dictate in French with a recognized AZERTY keyboard. It works with Firefox, Thunderbird, LO and Gedit without a hitch.

CC: (none) => guillaume.royer

Comment 28 Thomas Andrews 2023-12-10 21:21:58 CET
(In reply to Guillaume Royer from comment #27)
> Ok, I tested today elograf-0.5.8-1.mga9 with GNOME Wayland session. 
> 
> It's allright, I can now dictate in French with a recognized AZERTY
> keyboard. It works with Firefox, Thunderbird, LO and Gedit without a hitch.

So this latest attempt works OK with a Gnome Wayland session, but it reads to me like it still needs to be tested with an X11 session before it can be OKed. Are you up for it?

CC: (none) => andrewsfarm

Comment 29 Guillaume Royer 2023-12-14 21:32:45 CET
I tested Elograf in a GNOME Xorg session and set XDOTOOL as a parameter, as recommended, and it worked.
I tried in my VM PLasma but my micro usb is not recognized.
For me it's OK with this version
Comment 30 Thomas Andrews 2023-12-14 23:42:16 CET
Thanks. Giving this an OK based on Guillaume's tests, and Validating.

Whiteboard: (none) => MGA9-64-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 31 Mageia Robot 2023-12-15 20:00:54 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2023-0145.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.