Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

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

    Reply
    Page 66 of 91 | Prev | 56   64     65   66   67     68   76 | Next | Last
    Jannis | # 651 | 2013-06-23, 08:47 | Report

    Originally Posted by javispedro View Post
    That's great, specially if you let pocketsphinx know the current mode's reduced vocabulary & grammar.
    That's the case.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 6 Users Say Thank You to Jannis For This Useful Post:
    bingomion, Estel, javispedro, nokiabot, ranbaxy, Wikiwide

     
    Jannis | # 652 | 2013-06-26, 20:17 | Report

    [ -- See next page for a newer version -- ]

    Here is an early version of my "Voicy".
    It has to be installed manually.

    Please install:
    - pocketsphinx-utils
    - pocketsphinx-hmm-en-hub4wsj
    - pocketsphinx-lm-en-hub4
    - gstreamer0.10-pocketsphinx
    - python-gst0.10
    - python-gtk2
    - python-gobject
    - python-cairo
    - espeak
    - xdotool
    - Python module ConfigParser
    (Untar and run: python setup.py install)

    Create the directory /home/user/.voicy , it is needed to store a configuration file.

    See also the Readme.txt

    I hope it works for you ...


    @taixzo: If you like, we could perhaps merge our programs somehow. Anyhow, feel free to make use of the dictionary switching if you like.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: gz voicy.tar.gz (198.4 KB, 103 views)

    Last edited by Jannis; 2016-10-21 at 18:36. Reason: new version
    The Following 16 Users Say Thank You to Jannis For This Useful Post:
    Amboss, bingomion, Estel, impeham, javispedro, Kroll, MartinK, misiak, nokiabot, ranbaxy, rfeese, saponga, sixwheeledbeast, sunil, thedead1440, Wikiwide

     
    rfeese | # 653 | 2013-06-27, 18:17 | Report

    @Jannis: I'm trying to run this but I'm getting the following errors:

    opt/voicy $ ./voicy.py
    Can't open /sys/class/leds/lp5523:r/brightness
    Can't open /sys/class/leds/lp5523:r/brightness
    Can't open /sys/class/leds/lp5523:r/brightness
    debug info: can't parse config.ini-file, taking default values
    Can't open /sys/class/leds/lp5523:r/brightness
    Can't open /sys/class/leds/lp5523:r/brightness
    Traceback (most recent call last):
    File "./voicy.py", line 344, in <module>
    app = VoicyGUI()
    File "./voicy.py", line 60, in __init__
    VoicyCore.__init__(self)
    File "/opt/voicy/VoicyCore.py", line 43, in __init__
    self.init_gst()
    File "/opt/voicy/VoicyCore.py", line 107, in init_gst
    + '! fakesink')
    glib.GError: no element "vader"
    /opt/voicy $

    oops...
    OK, it looks like I'm missing some gstreamer and other libraries.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by rfeese; 2013-06-27 at 18:43. Reason: replying to myself
    The Following 5 Users Say Thank You to rfeese For This Useful Post:
    bingomion, nokiabot, ranbaxy, ripatti, Wikiwide

     
    Jannis | # 654 | 2013-06-27, 21:04 | Report

    Originally Posted by rfeese View Post
    @Jannis: I'm trying to run this but I'm getting the following errors:

    opt/voicy $ ./voicy.py
    Can't open /sys/class/leds/lp5523:r/brightness
    The program setLED must have set the SUID-bit (see ReadMe.txt)
    enter as root: chmod u+s setLED

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to Jannis For This Useful Post:
    bingomion, nokiabot, ranbaxy, rfeese, Wikiwide

     
    Jannis | # 655 | 2013-07-20, 15:31 | Report

    Has anyone managed to test voicy?

    I would like to know, whether there is a demand for other particular voicy-control functionalities.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to Jannis For This Useful Post:
    bingomion, ranbaxy, Wikiwide

     
    impeham | # 656 | 2013-08-16, 20:44 | Report

    Originally Posted by Jannis View Post
    Has anyone managed to test voicy?

    I would like to know, whether there is a demand for other particular voicy-control functionalities.
    Well - i'm trying to:

    copied all files to /opt/voicy, enabled all permissions and launched - "[root /opt/voicy]# python ./voicy.py"

    but i'm getting this error from the console:

    ---
    debug info: can't parse config.ini-file, taking default values
    Traceback (most recent call last):
    File "./voicy.py", line 344, in <module>
    app = VoicyGUI()
    File "./voicy.py", line 60, in __init__
    VoicyCore.__init__(self)
    File "/opt/voicy/VoicyCore.py", line 43, in __init__
    self.init_gst()
    File "/opt/voicy/VoicyCore.py", line 107, in init_gst
    + '! fakesink')
    glib.GError: no element "vader"
    ---

    [Edit]
    after installing "gstreamer0.10-pocketsphinx" this error is gone, but i'm getting a new one when starting voicy.py:

    ---
    Traceback (most recent call last):
    File "./voicy.py", line 344, in <module>
    app = VoicyGUI()
    File "./voicy.py", line 60, in __init__
    VoicyCore.__init__(self)
    File "/opt/voicy/VoicyCore.py", line 43, in __init__
    self.init_gst()
    File "/opt/voicy/VoicyCore.py", line 111, in init_gst
    asr.connect('result_score', self.asr_result_score)
    TypeError: <__main__.GstPocketSphinx object (asr) at 0x4118f0>: unknown signal name: result_score
    ---

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by impeham; 2013-08-16 at 21:01.
    The Following 5 Users Say Thank You to impeham For This Useful Post:
    bingomion, Kroll, nokiabot, ranbaxy, Wikiwide

     
    lexik | # 657 | 2013-08-17, 09:19 | Report

    Great piece of software!

    When you are talking about A.I., you probably mean that Siri-like-semi-A.I. If we want the true A.I. we have to use artifical neural network. A few examples:
    • PyBrain
    • FANN

    PyBrain is too complex and heavyweight - but really simple to use.
    FANN must be compiled [DONE] before use. It is written is C but have binding for python. That means it is way faster than PyBrain.

    Nowadays i'm trying to get PyBrain working, and modify Saera a little to make her "intelligent"

    However this is just extremely-experimental and with N900 HW it will probably be slow-unusable'n'battery-killer. But who knows

    EDIT: HERE is an .deb package with FANN library compiled in scratchbox.
    For now no python-binding, but just let me some time (or do it yourself). It is an old (2.1.0, last update was 2.2.0) version, you can compile the new one with cmake 2.8 which can be found somewhere on the forum.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by lexik; 2013-09-08 at 18:45.
    The Following 5 Users Say Thank You to lexik For This Useful Post:
    Amboss, bingomion, Kroll, ranbaxy, Wikiwide

     
    Jannis | # 658 | 2013-08-18, 08:42 | Report

    Originally Posted by impeham View Post

    [Edit]
    after installing "gstreamer0.10-pocketsphinx" this error is gone, but i'm getting a new one when starting voicy.py:

    ---
    Traceback (most recent call last):
    File "./voicy.py", line 344, in <module>
    app = VoicyGUI()
    File "./voicy.py", line 60, in __init__
    VoicyCore.__init__(self)
    File "/opt/voicy/VoicyCore.py", line 43, in __init__
    self.init_gst()
    File "/opt/voicy/VoicyCore.py", line 111, in init_gst
    asr.connect('result_score', self.asr_result_score)
    TypeError: <__main__.GstPocketSphinx object (asr) at 0x4118f0>: unknown signal name: result_score
    ---
    Sorry for that error.
    Please either use the patched version of pocketsphinx (it's included in the zip file) or change the line in VoicyCore.py

    Code:
    asr.connect('result_score', self.asr_result_score)
    into
    Code:
    try:
        asr.connect('result_score', self.asr_result_score)
    except:
        self.print_debug("patched version of pocketsphinx not installed")

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Jannis; 2013-08-18 at 08:43. Reason: typo
    The Following 6 Users Say Thank You to Jannis For This Useful Post:
    bingomion, Estel, impeham, Kroll, ranbaxy, Wikiwide

     
    impeham | # 659 | 2013-08-20, 02:13 | Report

    Originally Posted by Jannis View Post
    Sorry for that error.
    Please either use the patched version of pocketsphinx (it's included in the zip file) or change the line in VoicyCore.py

    Code:
    asr.connect('result_score', self.asr_result_score)
    into
    Code:
    try:
        asr.connect('result_score', self.asr_result_score)
    except:
        self.print_debug("patched version of pocketsphinx not installed")
    i couldn't find the pocketsphinx.so file in the target dir - should it be renamed to libpocketsphinx.so.1?

    trying to change the source code gave the following error:

    [root /opt/voicy]# ./voicy.py
    process 1753: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
    This is normally a bug in some application using the D-Bus library.
    process 1753: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
    This is normally a bug in some application using the D-Bus library.
    Aborted

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to impeham For This Useful Post:
    bingomion, Estel, ranbaxy, Wikiwide

     
    Jannis | # 660 | 2013-08-20, 21:30 | Report

    Originally Posted by impeham View Post
    i couldn't find the pocketsphinx.so file in the target dir - should it be renamed to libpocketsphinx.so.1?

    trying to change the source code gave the following error:

    [root /opt/voicy]# ./voicy.py
    process 1753: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
    This is normally a bug in some application using the D-Bus library.
    process 1753: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
    This is normally a bug in some application using the D-Bus library.
    Aborted

    When pocketsphinx is installed, the file pocketsphinx.so should be in the directory /usr/lib/pyshared/python2.5
    You can replace this file with the patched version.

    Hmm, I have never experienced that dbus-error you described above. When exactly does this error message occur?
    Perhaps try the following to see whether dbus generally works:
    - Start the mediaplayer and let it play an mp3 file
    - open an xterm
    - start python
    - enter the following two lines of code:
    Code:
    import subprocess as sb
    sb.call('dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause', shell=True)
    The mediaplayer should pause now.

    If this worked, please enter the following python code:
    Code:
    import dbus
    bus = dbus.SessionBus()
    obj = bus.get_object("com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer", "/com/nokia/mafw/renderer/gstrenderer")
    mafw = dbus.Interface(obj, "com.nokia.mafw.extension")
    volume = int(mafw.get_extension_property("volume")[1])
    print volume
    It should print the current volume - level (something from 0 - 100)

    See the attached file for easier copy&paste.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: txt testcode.txt (476 Bytes, 70 views)
    The Following 4 Users Say Thank You to Jannis For This Useful Post:
    bingomion, impeham, ranbaxy, Wikiwide

     
    Page 66 of 91 | Prev | 56   64     65   66   67     68   76 | Next | Last
vBulletin® Version 3.8.8
Normal Logout