Notices


Reply
Thread Tools
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#651
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.
 

The Following 6 Users Say Thank You to Jannis For This Useful Post:
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#652
[ -- 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.
Attached Files
File Type: gz voicy.tar.gz (198.4 KB, 97 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:
Posts: 77 | Thanked: 76 times | Joined on Feb 2010
#653
@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.

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:
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#654
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
 

The Following 5 Users Say Thank You to Jannis For This Useful Post:
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#655
Has anyone managed to test voicy?

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

The Following 3 Users Say Thank You to Jannis For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#656
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
---

Last edited by impeham; 2013-08-16 at 21:01.
 

The Following 5 Users Say Thank You to impeham For This Useful Post:
Posts: 71 | Thanked: 177 times | Joined on Aug 2013
#657
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.

Last edited by lexik; 2013-09-08 at 18:45.
 

The Following 5 Users Say Thank You to lexik For This Useful Post:
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#658
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")

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:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#659
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
 

The Following 4 Users Say Thank You to impeham For This Useful Post:
Posts: 21 | Thanked: 102 times | Joined on Apr 2010
#660
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.
Attached Files
File Type: txt testcode.txt (476 Bytes, 66 views)
 

The Following 4 Users Say Thank You to Jannis For This Useful Post:
Reply

Tags
saera, speech-to-text


 
Forum Jump


All times are GMT. The time now is 17:01.