maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS (https://talk.maemo.org/showthread.php?t=84753)

nthn 2017-01-31 16:23

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
I installed flite-minimal and the latest version of Saera from your repository on OpenRepos, but for some reason Saera is completely silent.

taixzo 2017-01-31 16:54

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Quote:

Originally Posted by robthebold (Post 1522661)
I'm running into a dependency problem: espeak isn't found.

SFOS 2.0.5.6 Onyx (oneplus x) port. I've pkcon refresh(ed). I seem to recsll espeak was broken before in the 'crashes you device' sense--has it bren pulled from the repos? Is it too early in the morning for me and I'm forgetting something stupid?

Thanks

Espeak is available at https://openrepos.net/content/birdzhang/espeak-sailfish. I haven't way to make a dependency on that repo from mine - maybe I should just re-upload the package to my repo? I have a OnePlus X as well and have not run into any issues with espeak as used by saera (outputting wav instead of talking to sound drivers directly).

Quote:

Originally Posted by nthn (Post 1522662)
I installed flite-minimal and the latest version of Saera from your repository on OpenRepos, but for some reason Saera is completely silent.

If you unintstall flite (so Saera uses espeak instead), does sound output work?

Fellfrosch 2017-01-31 17:21

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
#
Quote:

Originally Posted by taixzo (Post 1522659)
Could you start saera from a terminal (run harbour-saera) and let me know what error you are getting?

Code:

| SailfishOS 2.0.5.6 (Haapajoki) (armv7hl)
'---
[nemo@Sailfish ~]$ harbour-saera
[D] QQmlDebuggingEnabler::QQmlDebuggingEnabler:1455 - QML debugging is enabled. Only use this in a safe environment.
[D] QWaylandEglClientBufferIntegration::QWaylandEglClientBufferIntegration:62 - Using Wayland-EGL
[D] onCompleted:48 - testing
WARNING: The 'tracker-sparql' command is no longer available.
WARNING: Use 'tracker <command> [<args>]' instead...\n

(tracker sparql:18200): Tracker-WARNING **: Locale '0' is not set, defaulting to C locale
Could not run query, GDBus.Error:org.freedesktop.Tracker1.SparqlError.Parse: 1.7: syntax error, expected `{'
/home/nemo/.cache/saera/musictitles.grammar has 1 rules
/home/nemo/.cache/saera/musictitles.voca    has 3 categories and 3 words
---
Now parsing grammar file
Now modifying grammar to minimize states[-1]
Now parsing vocabulary file
Now making nondeterministic finite automaton[1/1]
Error:      undefined class "TITLE"
Error: cannot open "/home/nemo/.cache/saera/musictitles.dfa.tmp"
---
no .dfa or .dict file generated
/usr/share/harbour-saera/qml/pages/julius/ARM/mkdfa.pl /home/nemo/.cache/saera/musictitles
Connecting to pyjulius server
Try `-help' for more information.

if I interrupt with control c Saera starts, haven't tested yet, if it works.
Edit: No, Saera doesn't react. I can go to settings. But can't save them.

taixzo 2017-01-31 17:39

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Thanks, I will release a patch this evening.

nthn 2017-01-31 17:45

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Quote:

Originally Posted by taixzo (Post 1522663)
If you unintstall flite (so Saera uses espeak instead), does sound output work?

Nope! I'm pretty sure it used to work before this last release. I haven't tried rebooting, though, if that would change anything.

taixzo 2017-01-31 18:02

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Is there sound output from other applications? Does Saera show any errors if you run
Code:

harbour-saera
in a terminal?

taixzo 2017-02-01 04:51

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
I have released version 2.3.1 which contains a patch to ignore .dfa files if they are not built successfully. This should prevent the errors people are seeing at startup, but may prevent you from being able to say "Play <song title>" on SFOS 2.0 (or greater). I do not have anything running 2.0 yet, so I cannot test that at the moment.

Fellfrosch 2017-02-01 10:05

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Thanks for that fast fix. Saera works now!

nthn 2017-02-01 11:07

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Well, now it doesn't work at all anymore. No sound, no response to my queries, nothing. Settings are lost as soon as I go back to the main view.

I've deleted all files and folders with "saera" in their names, and it didn't change anything.

Here's some terminal output with a lot of errors, the first part is probably just caused by the unofficial language pack.

Code:

WARNING: Use 'tracker <command> [<args>]' instead...\n
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Could not run query, 1.7: syntax error, expected `{'
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "nl_NL.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/home/nemo/.cache/saera/musictitles.grammar has 1 rules
/home/nemo/.cache/saera/musictitles.voca    has 3 categories and 3 words
---
Now parsing grammar file

Now modifying grammar to minimize states[-1]
Now parsing vocabulary file

Now making nondeterministic finite automaton
Now making nondeterministic finite automaton[1/1]
Error:      undefined class "TITLE"
Error: cannot open "/home/nemo/.cache/saera/musictitles.dfa.tmp"
---
no .dfa or .dict file generated
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "/usr/share/harbour-saera/qml/pages/saera2.py", line 58, in <module>
    import sailfish_hw as platform

  File "/usr/share/harbour-saera/qml/pages/sailfish_hw.py", line 272, in <module>
    espeak2julius.create_grammar(list(contacts) if contacts else ['John Smith'], 'contacts', 'contacts')

  File "/usr/share/harbour-saera/qml/pages/espeak2julius.py", line 161, in create_grammar
    c.append(e2j(word))

  File "/usr/share/harbour-saera/qml/pages/espeak2julius.py", line 38, in e2j
    original_result, err = subprocess.Popen(['espeak','-x','-q',string],stdout=subprocess.PIPE).communicate()

  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)

  File "/usr/lib/python3.4/subprocess.py", line 1395, in _execute_child
    restore_signals, start_new_session, preexec_fn)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)
"
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Cannot import module: saera2 (Traceback (most recent call last):

  File "/usr/share/harbour-saera/qml/pages/saera2.py", line 58, in <module>
    import sailfish_hw as platform

  File "/usr/share/harbour-saera/qml/pages/sailfish_hw.py", line 272, in <module>
    espeak2julius.create_grammar(list(contacts) if contacts else ['John Smith'], 'contacts', 'contacts')

  File "/usr/share/harbour-saera/qml/pages/espeak2julius.py", line 161, in create_grammar
    c.append(e2j(word))

  File "/usr/share/harbour-saera/qml/pages/espeak2julius.py", line 38, in e2j
    original_result, err = subprocess.Popen(['espeak','-x','-q',string],stdout=subprocess.PIPE).communicate()

  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)

  File "/usr/lib/python3.4/subprocess.py", line 1395, in _execute_child
    restore_signals, start_new_session, preexec_fn)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)
)
[D] onError:256 - Python error: Function not found: 'saera2.resume_daemons' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onError:256 - Python error: Function not found: 'saera2.activate' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.initialize' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onError:256 - Python error: Function not found: 'saera2.resume_daemons' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onError:256 - Python error: Function not found: 'saera2.activate' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_position' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.run_text' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.check_can_listen' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onCheckedChanged:110 - Checked
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_24_hour_mode' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onCheckedChanged:110 - Unchecked
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_24_hour_mode' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] onCurrentIndexChanged:134 - Always
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.set_ovr_mode' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"
[D] onError:256 - Python error: Function not found: 'saera2.pause_daemons' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
)
[D] QPythonPriv::formatExc:612 - "PyOtherSide error: Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'saera2' is not defined
"


taixzo 2017-02-01 13:37

Re: [DEVEL] Saera: Siri clone for Maemo5, Harmattan and Sailfish OS
 
Quote:

Originally Posted by nthn (Post 1522702)
Well, now it doesn't work at all anymore. No sound, no response to my queries, nothing. Settings are lost as soon as I go back to the main view.

It looks like settings are not actually being lost until going back to the Settings page (i.e. the Settings page isn't loading the settings correctly), but same effect.

Quote:

Originally Posted by nthn (Post 1522702)
Here's some terminal output with a lot of errors, the first part is probably just caused by the unofficial language pack.

Looks like I made some poor assumptions as an American whose contact names don't contain any Unicode characters. I'll see what I can do to fix that; in the meantime, I have uploaded a patch which will simply disable contact loading if it encounters Unicode errors.


All times are GMT. The time now is 04:58.

vBulletin® Version 3.8.8