GNU bug report logs - #61236
ibus-speech-to-text engine fails to run (?)

Previous Next

Package: guix;

Reported by: Luis Felipe <luis.felipe.la <at> protonmail.com>

Date: Thu, 2 Feb 2023 19:48:02 UTC

Severity: normal

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61236 in the body.
You can then email your comments to 61236 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Thu, 02 Feb 2023 19:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luis Felipe <luis.felipe.la <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 02 Feb 2023 19:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Luis Felipe <luis.felipe.la <at> protonmail.com>
To: Luis Felipe via Bug reports for GNU Guix <bug-guix <at> gnu.org>
Subject: ibus-speech-to-text engine fails to run (?)
Date: Thu, 02 Feb 2023 19:46:53 +0000
[Message part 1 (text/plain, inline)]
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/
[publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Fri, 03 Feb 2023 07:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: Luis Felipe <luis.felipe.la <at> protonmail.com>, 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Fri, 03 Feb 2023 08:14:42 +0100
Am Donnerstag, dem 02.02.2023 um 19:46 +0000 schrieb Luis Felipe:
> 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).
Since this workaround works for you, I am fairly certain that the
package is simply missing a wrapper for GI_TYPELIB_PATH.  IMHO we
should more generally add some code to handle that in glib-or-gtk-
build-system, but that'd be a core-updates change.

Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Fri, 03 Feb 2023 17:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Luis Felipe <luis.felipe.la <at> protonmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Fri, 03 Feb 2023 17:07:17 +0000
[Message part 1 (text/plain, inline)]
On Friday, February 3rd, 2023 at 07:14, Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at> wrote:

> Am Donnerstag, dem 02.02.2023 um 19:46 +0000 schrieb Luis F
> 

> Since this workaround works for you, I am fairly certain that the
> package is simply missing a wrapper for GI_TYPELIB_PATH. IMHO we
> should more generally add some code to handle that in glib-or-gtk-
> build-system, but that'd be a core-updates change.

The funny thing is that the package already wraps programs and augment GI_TYPELIB_PATH. Although I don't understand why ibus' "/lib/girepository-1.0" is also added to GUIX_PYTHONPATH.

Now, that the build system could handle all this in the future sounds great to me.
[publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Tue, 07 Feb 2023 16:42:03 GMT) Full text and rfc822 format available.

Message #14 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Luis Felipe <luis.felipe.la <at> protonmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Tue, 07 Feb 2023 16:41:41 +0000
[Message part 1 (text/plain, inline)]
Hi,

The attached patch fixed the issue for me. Now ibus-engine-stt seems to be running correctly and I can switch to the input method without the workaround indicated in the initial report.

I noticed that there are some lint issues from the original package definition though. I didn't fixed those:

$ ./pre-inst-env guix lint ibus-speech-to-text
/home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0: 

[1] 'desktop-file-utils' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0: 

[2] 'glib:bin' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0: 

[3] 'gobject-introspection' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0: 

[4] label 'glib' does not match package name 'glib:bin'

/home/yo/guix/gnu/packages/ibus.scm:856:2: ibus-speech-to-text <at> 0.4.0: 

[5] "bash-minimal" should be in 'inputs' when 'wrap-program' is used
[0001-gnu-ibus-speech-to-text-Fix-execution-of-ibus-engine.patch (text/x-patch, attachment)]
[publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Wed, 08 Feb 2023 07:33:02 GMT) Full text and rfc822 format available.

Message #17 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: Luis Felipe <luis.felipe.la <at> protonmail.com>
Cc: 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Wed, 08 Feb 2023 08:32:43 +0100
Am Dienstag, dem 07.02.2023 um 16:41 +0000 schrieb Luis Felipe:
> Hi,
> 
> The attached patch fixed the issue for me. Now ibus-engine-stt seems
> to be running correctly and I can switch to the input method without
> the workaround indicated in the initial report.
> 
> I noticed that there are some lint issues from the original package
> definition though. I didn't fixed those:
> 
> $ ./pre-inst-env guix lint ibus-speech-to-text
> /home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0:
> 
> [1] 'desktop-file-utils' should probably be a native input
> 
> /home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0:
> 
> [2] 'glib:bin' should probably be a native input
> 
> /home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0:
> 
> [3] 'gobject-introspection' should probably be a native input
> 
> /home/yo/guix/gnu/packages/ibus.scm:899:5: ibus-speech-to-text <at> 0.4.0:
> 
> [4] label 'glib' does not match package name 'glib:bin'
> 
> /home/yo/guix/gnu/packages/ibus.scm:856:2: ibus-speech-to-text <at> 0.4.0:
> 
> [5] "bash-minimal" should be in 'inputs' when 'wrap-program' is used
All but [4] should be fixed.  Can you attach a separate patch to do so?
(If possible, use `git send-email` with a reroll count of 2, so that CI
and mumi-based workflows behave as intended.)

> * gnu/packages/ibus.scm (ibus-speech-to-text)[phases]: 
Should probably be #:phases.
> Remove path to ibus-stt directory from GI_TYPELIB_PATH, since it
> doesn't provide typelibs.
Should probably be "Use getenv to set GUIX_PYTHONPATH."

> Remove path to ibus' typelibs directory from GUIX_PYTHONPATH, since
> it doesn't provide Python modules.
I think you should also use getenv here.  I think we should mimic
python-build-system here and add the output directory to
GUIX_PYTHONPATH before it gets wrapped.

> Remove unnecessary delimiters from all environment variables.
I don't think it's necessary to remove them ;)

Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Thu, 09 Feb 2023 19:34:02 GMT) Full text and rfc822 format available.

Message #20 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Luis Felipe <luis.felipe.la <at> protonmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Thu, 09 Feb 2023 19:33:42 +0000
[Message part 1 (text/plain, inline)]
Hi Liliana,

> > Remove path to ibus' typelibs directory from GUIX_PYTHONPATH, since
> > it doesn't provide Python modules.
> 

> I think you should also use getenv here. I think we should mimic
> python-build-system here and add the output directory to
> GUIX_PYTHONPATH before it gets wrapped.

I'm not sure I understand this part. Do you mean something like this (set GUIX_PYTHONPATH in the let definitions)?:

(let* ((out (assoc-ref outputs "out"))
       (ibus-stt-dir (string-append out "/share/ibus-stt"))
       (guix-pythonpath
        (setenv "GUIX_PYTHONPATH"
                (string-append ibus-stt-dir ":"
                               (getenv "GUIX_PYTHONPATH")))))
  (for-each (lambda (prog)
              (wrap-program prog
                `("GST_PLUGIN_PATH" ":" prefix
                  (,(string-append (assoc-ref inputs "gst-vosk")
                                   "/lib/gstreamer-1.0")
                   ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
                `("GUIX_PYTHONPATH" =
                  (,(getenv "GUIX_PYTHONPATH")))
                `("GI_TYPELIB_PATH" =
                  (,(getenv "GI_TYPELIB_PATH")))))
            (list (string-append out "/libexec/ibus-engine-stt")
                  (string-append out "/libexec/ibus-setup-stt"))))

In the meantime, I just sent a new version of the patch using git send-email to refresh my memory (haven't used it in years) and check whether automatic tasks are triggered in the infrastructure. The new patch amends the commit message and puts delimiters back. I will send another version later once I understand what is left to be done, together with the other patch to fix lint issues, as you suggested.
[publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Thu, 09 Feb 2023 19:40:01 GMT) Full text and rfc822 format available.

Message #23 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: sirgazil <at> zoho.com
To: 61236 <at> debbugs.gnu.org
Cc: Luis Felipe <luis.felipe.la <at> protonmail.com>
Subject: [PATCH v1] gnu: ibus-speech-to-text: Fix execution of ibus-engine-stt.
Date: Thu,  9 Feb 2023 14:38:37 -0500
From: Luis Felipe <luis.felipe.la <at> protonmail.com>

Fixes <https://issues.guix.gnu.org/61236>.

* gnu/packages/ibus.scm (ibus-speech-to-text)[#:phases]: Use getenv to
set GUIX_PYTHONPATH and GI_TYPELIB_PATH.
---
 gnu/packages/ibus.scm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4c45671acc..28c0cb69c1 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2021 Songlin Jiang <hollowman <at> hollowman.ml>
 ;;; Copyright © 2021 Taiju HIGASHI <higashi <at> taiju.info>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -888,15 +889,9 @@ (define-public ibus-speech-to-text
                                 ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
                              `("GUIX_PYTHONPATH" ":" prefix
                                (,(getenv "GUIX_PYTHONPATH")
-                                ,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
-                                ,(string-append (assoc-ref outputs "out")
-                                                "/share/ibus-stt")))
-                             `("GI_TYPELIB_PATH" ":" prefix
-                               (,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
-                                ,(string-append (assoc-ref outputs "out")
-                                                "/share/ibus-stt")))))
+                                ,(string-append out "/share/ibus-stt")))
+                             `("GI_TYPELIB_PATH" =
+                               (,(getenv "GI_TYPELIB_PATH")))))
                          (list (string-append out "/libexec/ibus-engine-stt")
                                (string-append out "/libexec/ibus-setup-stt")))))))))
     (inputs

base-commit: 1f684d00d25f0f205c4cc4b762d8f56911062581
-- 
2.38.1





Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Fri, 10 Feb 2023 06:43:01 GMT) Full text and rfc822 format available.

Message #26 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: Luis Felipe <luis.felipe.la <at> protonmail.com>
Cc: 61236 <at> debbugs.gnu.org
Subject: Re: ibus-speech-to-text engine fails to run (?)
Date: Fri, 10 Feb 2023 07:42:36 +0100
Am Donnerstag, dem 09.02.2023 um 19:33 +0000 schrieb Luis Felipe:
> Hi Liliana,
> 
> > > Remove path to ibus' typelibs directory from GUIX_PYTHONPATH,
> > > since it doesn't provide Python modules.
> > 
> 
> > I think you should also use getenv here. I think we should mimic
> > python-build-system here and add the output directory to
> > GUIX_PYTHONPATH before it gets wrapped.
> 
> I'm not sure I understand this part. Do you mean something like this
> (set GUIX_PYTHONPATH in the let definitions)?:
> 
> (let* ((out (assoc-ref outputs "out"))
>        (ibus-stt-dir (string-append out "/share/ibus-stt"))
>        (guix-pythonpath
>         (setenv "GUIX_PYTHONPATH"
>                 (string-append ibus-stt-dir ":"
>                                (getenv "GUIX_PYTHONPATH")))))
>   (for-each (lambda (prog)
>               (wrap-program prog
>                 `("GST_PLUGIN_PATH" ":" prefix
>                   (,(string-append (assoc-ref inputs "gst-vosk")
>                                    "/lib/gstreamer-1.0")
>                    ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
>                 `("GUIX_PYTHONPATH" =
>                   (,(getenv "GUIX_PYTHONPATH")))
>                 `("GI_TYPELIB_PATH" =
>                   (,(getenv "GI_TYPELIB_PATH")))))
>             (list (string-append out "/libexec/ibus-engine-stt")
>                   (string-append out "/libexec/ibus-setup-stt"))))
No, I meant more like 
  (add-after 'set-paths 'add-output-to-pythonpath
    (lambda* (#:key outputs #:allow-other-keys)
       (setenv ...)))
Confer %standard-phases in (guix build python-build-system) or 
(guix build pyproject-build-system) for the ordering of phases there. 
I'm fairly certain that GUIX_PYTHONPATH is configured rather soon-ish.

> In the meantime, I just sent a new version of the patch using git
> send-email to refresh my memory (haven't used it in years) and check
> whether automatic tasks are triggered in the infrastructure. The new
> patch amends the commit message and puts delimiters back. I will send
> another version later once I understand what is left to be done,
> together with the other patch to fix lint issues, as you suggested.
When you do, don't forget to CC <liliana.prikler <at> gmail.com>.

Thanks

Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Fri, 10 Feb 2023 18:51:01 GMT) Full text and rfc822 format available.

Message #29 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: sirgazil <at> zoho.com
To: 61236 <at> debbugs.gnu.org
Cc: Luis Felipe <luis.felipe.la <at> protonmail.com>, liliana.prikler <at> gmail.com
Subject: [PATCH v2 1/2] gnu: ibus-speech-to-text: Fix execution of
 ibus-engine-stt.
Date: Fri, 10 Feb 2023 13:49:23 -0500
From: Luis Felipe <luis.felipe.la <at> protonmail.com>

Fixes <https://issues.guix.gnu.org/61236>.

* gnu/packages/ibus.scm (ibus-speech-to-text)[#:phases]: Use getenv to
set GUIX_PYTHONPATH and GI_TYPELIB_PATH.
---
 gnu/packages/ibus.scm | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4c45671acc..51ad37b613 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2021 Songlin Jiang <hollowman <at> hollowman.ml>
 ;;; Copyright © 2021 Taiju HIGASHI <higashi <at> taiju.info>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -875,6 +876,13 @@ (define-public ibus-speech-to-text
              (substitute* "meson.build"
                (("update_desktop_database: true")
                 "update_desktop_database: false"))))
+         (add-after 'set-paths 'add-output-to-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (ibus-stt-dir (string-append out "/share/ibus-stt")))
+               (setenv "GUIX_PYTHONPATH"
+                       (string-append ibus-stt-dir ":"
+                                      (getenv "GUIX_PYTHONPATH"))))))
          (add-after 'install 'wrap-with-additional-paths
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Make sure 'ibus-{setup,engine}-stt' find the gst-vosk plugin
@@ -886,17 +894,10 @@ (define-public ibus-speech-to-text
                                (,(string-append (assoc-ref inputs "gst-vosk")
                                                 "/lib/gstreamer-1.0")
                                 ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
-                             `("GUIX_PYTHONPATH" ":" prefix
-                               (,(getenv "GUIX_PYTHONPATH")
-                                ,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
-                                ,(string-append (assoc-ref outputs "out")
-                                                "/share/ibus-stt")))
-                             `("GI_TYPELIB_PATH" ":" prefix
-                               (,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
-                                ,(string-append (assoc-ref outputs "out")
-                                                "/share/ibus-stt")))))
+                             `("GUIX_PYTHONPATH" =
+                               (,(getenv "GUIX_PYTHONPATH")))
+                             `("GI_TYPELIB_PATH" =
+                               (,(getenv "GI_TYPELIB_PATH")))))
                          (list (string-append out "/libexec/ibus-engine-stt")
                                (string-append out "/libexec/ibus-setup-stt")))))))))
     (inputs

base-commit: 1f684d00d25f0f205c4cc4b762d8f56911062581
-- 
2.38.1





Information forwarded to bug-guix <at> gnu.org:
bug#61236; Package guix. (Fri, 10 Feb 2023 18:51:02 GMT) Full text and rfc822 format available.

Message #32 received at 61236 <at> debbugs.gnu.org (full text, mbox):

From: sirgazil <at> zoho.com
To: 61236 <at> debbugs.gnu.org
Cc: Luis Felipe <luis.felipe.la <at> protonmail.com>, liliana.prikler <at> gmail.com
Subject: [PATCH v2 2/2] gnu: ibus-speech-to-text: Fix lint warnings.
Date: Fri, 10 Feb 2023 13:49:24 -0500
From: Luis Felipe <luis.felipe.la <at> protonmail.com>

* gnu/packages/ibus.scm (ibus-speech-to-text)[inputs]: Add
bash-minimal.  Move desktop-file-utils, glib:bin and
gobject-introspection to native-inputs.
---
 gnu/packages/ibus.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 51ad37b613..b3bf3036bc 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -901,9 +901,7 @@ (define-public ibus-speech-to-text
                          (list (string-append out "/libexec/ibus-engine-stt")
                                (string-append out "/libexec/ibus-setup-stt")))))))))
     (inputs
-     (list desktop-file-utils
-           (list glib "bin")
-           gobject-introspection
+     (list bash-minimal
            gst-vosk
            gstreamer
            gtk
@@ -913,7 +911,11 @@ (define-public ibus-speech-to-text
            python-babel
            python-pygobject))
     (native-inputs
-     (list gettext-minimal libxml2 pkg-config))
+     (list desktop-file-utils
+           gettext-minimal
+           (list glib "bin")
+           gobject-introspection
+           libxml2 pkg-config))
     (home-page "https://github.com/PhilippeRo/IBus-Speech-To-Text")
     (synopsis "Speech to text IBus engine using VOSK")
     (description "This Input Method uses VOSK for voice recognition and allows
-- 
2.38.1





Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Sun, 12 Feb 2023 07:54:02 GMT) Full text and rfc822 format available.

Notification sent to Luis Felipe <luis.felipe.la <at> protonmail.com>:
bug acknowledged by developer. (Sun, 12 Feb 2023 07:54:02 GMT) Full text and rfc822 format available.

Message #37 received at 61236-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: sirgazil <at> zoho.com, 61236-done <at> debbugs.gnu.org
Cc: Luis Felipe <luis.felipe.la <at> protonmail.com>
Subject: Re: [PATCH v2 2/2] gnu: ibus-speech-to-text: Fix lint warnings.
Date: Sun, 12 Feb 2023 08:53:30 +0100
Am Freitag, dem 10.02.2023 um 13:49 -0500 schrieb sirgazil <at> zoho.com:
> From: Luis Felipe <luis.felipe.la <at> protonmail.com>
> 
> * gnu/packages/ibus.scm (ibus-speech-to-text)[inputs]: Add
> bash-minimal.  Move desktop-file-utils, glib:bin and
> gobject-introspection to native-inputs.
> ---
Updated commit messages and pushed.

Cheers




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Mar 2023 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.