unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61236: ibus-speech-to-text engine fails to run (?)
@ 2023-02-02 19:46 Luis Felipe via Bug reports for GNU Guix
  2023-02-03  7:14 ` Liliana Marie Prikler
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Luis Felipe via Bug reports for GNU Guix @ 2023-02-02 19:46 UTC (permalink / raw)
  To: 61236


[-- Attachment #1.1: Type: text/plain, Size: 3423 bytes --]

I can add `ibus-speech-to-text` (aka IBus STT) to my input methods, and set it up, but once selected for input, it doesn't work.


## STEPS TO REPRODUCE

1. `guix install ibus ibus-speech-to-text`
2. In GNOME Settings → Keyboard, add IBus STT to the list of input methods (it is displayed as `Other (Speech To Text)`)
3. In IBus STT Settings → General:

    + Preload models: ON
    + Active on start: ON
    + System locale: OFF
    + Locales: Select the lightweight model for English (USA)

4. In the desktop, start an app and place the text cursor in a text field (tried on IceCat, Ungoogled Chromium, GNOME Text Editor, GNOME Shell)
5. Switch to IBus STT input method using Super+Space (give it about 1 second to load).
6. Dictate to the machine.


## EXPECTED RESULT

Text is typed magically as you speak in the text field selected in step 4.


## UNEXPECTED RESULT

No text is added to the text field I selected in step 4.


## SYSTEM INFORMATION

~~~
OS: Guix System x86_64 fb3085e
Kernel: 6.1.5-gnu 

DE: GNOME 42.4 (tried on Wayland and Xorg)
ibus: 1.5.27
ibus-speech-to-text: 0.4.0
~~~


## ADDITIONAL INFORMATION

Could it be that the speech-to-text engine is failing to run because it can't find the GTK 4.0 namespace through Gobject Introspection. For example, after being pointed to the following command by IBus STT developer (https://github.com/PhilippeRo/IBus-Speech-To-Text/discussions/7) I see the following error:

~~~
$ /gnu/store/HASH-ibus-speech-to-text-0.4.0/libexec/ibus-engine-stt --gapplication-replace -g
Traceback (most recent call last):
  File "/gnu/store/87dgkps8sp1jb4z2w4m1dnp0zvnq050l-ibus-speech-to-text-0.4.0/share/ibus-stt/main.py", line 38, in <module>
    from sttenginefactory import STTEngineFactory
  File "/gnu/store/87dgkps8sp1jb4z2w4m1dnp0zvnq050l-ibus-speech-to-text-0.4.0/share/ibus-stt/sttenginefactory.py", line 26, in <module>
    from sttengine import STTEngine
  File "/gnu/store/87dgkps8sp1jb4z2w4m1dnp0zvnq050l-ibus-speech-to-text-0.4.0/share/ibus-stt/sttengine.py", line 29, in <module>
    gi.require_version('Gtk', '4.0')
  File "/gnu/store/5ijhwr127smgxrp5dls7dxnr9jwa4m8p-python-pygobject-3.40.1/lib/python3.9/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Gtk not available for version 4.0
~~~

In the command above, HASH is the hash corresponding to `ibus-speech-to-text-0.4.0` in my user profile.


## WORKAROUND

The input method works after making sure `gtk` and `python-pygobject` are in the environment where `ibus-engine-stt` is run:

1. Start an augmented shell:

   guix shell ibus-speech-to-text gtk python-pygobject

2. Run `ibus-engine-stt` as follows (where HASH is the hash for ibus-speech-to-text-0.4.0 in the profile created for the shell in step one):

   /gnu/store/HASH-ibus-speech-to-text-0.4.0/libexec/ibus-engine-stt --gapplication-replace -g

After this, you should see INFO and DEBUG information printed out. You can now launch an application, place the caret in any text box, switch to speech-to-text input method, and start dictating to the machine. Selecting other languages in "IBus STT settings → General → Locale" also work (I tried dictating in English, Japanese and Spanish).



---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-12  8:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 19:46 bug#61236: ibus-speech-to-text engine fails to run (?) Luis Felipe via Bug reports for GNU Guix
2023-02-03  7:14 ` Liliana Marie Prikler
2023-02-03 17:07   ` Luis Felipe via Bug reports for GNU Guix
2023-02-07 16:41     ` Luis Felipe via Bug reports for GNU Guix
2023-02-08  7:32       ` Liliana Marie Prikler
2023-02-09 19:33         ` Luis Felipe via Bug reports for GNU Guix
2023-02-10  6:42           ` Liliana Marie Prikler
2023-02-09 19:38 ` bug#61236: [PATCH v1] gnu: ibus-speech-to-text: Fix execution of ibus-engine-stt sirgazil--- via Bug reports for GNU Guix
2023-02-10 18:49 ` bug#61236: [PATCH v2 1/2] " sirgazil--- via Bug reports for GNU Guix
2023-02-10 18:49   ` bug#61236: [PATCH v2 2/2] gnu: ibus-speech-to-text: Fix lint warnings sirgazil--- via Bug reports for GNU Guix
2023-02-12  7:53     ` Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).