| The Following 31 Users Say Thank You to krzyc For This Useful Post: | ||
|
|
2013-04-10
, 14:17
|
|
Posts: 29 |
Thanked: 77 times |
Joined on Mar 2013
@ Australia Maaaaaaaaate
|
#4
|
.So what is happening.....
|
|
2013-04-12
, 12:58
|
|
|
Posts: 665 |
Thanked: 2,388 times |
Joined on Feb 2012
@ Zagreb, Croatia
|
#6
|
| The Following 4 Users Say Thank You to knobtviker For This Useful Post: | ||
|
|
2013-04-16
, 14:59
|
|
Posts: 29 |
Thanked: 77 times |
Joined on Mar 2013
@ Australia Maaaaaaaaate
|
#9
|
.I was also thing if it would be a worthwhile contacting Taixzo,the developer of Saera,to ask if this codeing could be blended in his ? Just an idea
All I am is a dumb corrosion engineer........
| The Following 5 Users Say Thank You to ghost_who_walks For This Useful Post: | ||
|
|
2013-04-19
, 09:57
|
|
Posts: 28 |
Thanked: 14 times |
Joined on Jul 2012
@ India
|
#10
|
![]() |
| Tags |
| espeakcaller, nokia n9 |
| Thread Tools | |
|
#!/usr/bin/env python import gobject import subprocess import re import dbus import dbus.mainloop.glib def handle_call(x, y): # remove non alphanum chars n = re.sub('[^\w ]', '', x[0]['displayName']) print n # check if we have a number or alphanum string if re.match('[+0-9]+', n) == None: # say it eSpeakProc = subprocess.Popen(["espeak", "-vpl", '"' + n + '"'], shell=False) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.add_signal_receiver(handle_call, path='/com/nokia/CallUi/ActiveCall', dbus_interface='org.maemo.contextkit.Property', signal_name='ValueChanged') loop = gobject.MainLoop() loop.run()Now it works. If there are no unexpected traps I will try to modify espeakcaller (it's GPL) for N9 and package it to deb file as soon as I get some free time.
PS. Is there any event when user mutes ring (by clicking or turning over the phone) which I can listen to to mute espeak also?
Last edited by krzyc; 2012-12-27 at 03:22.