Active Topics

 


Reply
Thread Tools
Posts: 287 | Thanked: 165 times | Joined on Oct 2009 @ The Netherlands
#11
Originally Posted by pillar View Post
Great tip qwerty12. The file looks like the right place to try stuff. Since I am using espeak inside my app I tried this:

[stream]
exe = espeak
group = ringtone

.. but nothing seemed to change.
Just a hunch. Did you restart? Some settings are only loaded once.
 
pillar's Avatar
Posts: 154 | Thanked: 124 times | Joined on Mar 2007
#12
Originally Posted by robbie View Post
Just a hunch. Did you restart? Some settings are only loaded once.
Yeah, I tried once without a restart and then again after restart, I had the same hunch
 

The Following 2 Users Say Thank You to pillar For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#13
Try

group = alwayson

Programs in this group can play while a ringtone is playing.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following User Says Thank You to Matan For This Useful Post:
pillar's Avatar
Posts: 154 | Thanked: 124 times | Joined on Mar 2007
#14
Tried always on, but didn't notice any difference.
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#15
It works for me:

Added
Code:
[stream]
exe = mplayer
group = alwayson
To /etc/pulse/xpolicy.conf (it is a sym link to the same file).

Created a silent mp3 and set it as ringtone (it works with noisy ringtone as well, but easier with silent).

Rebooted phone (to make sure all changes take effect).

Played an mp3 file using mplayer (-ao pulse).

Called the N900 (using skype, as I don't have a SIM in it. This is the only issue that might matter in my opinion).

mplayer continues to play while the phone is "ringing".

I also tried starting mplayer while ringing, and it also works.

Where does your experience deviate from mine?
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following User Says Thank You to Matan For This Useful Post:
lcuk's Avatar
Posts: 1,635 | Thanked: 1,816 times | Joined on Apr 2008 @ Manchester, England
#16
this is a decent idea, i can see why you miss it.
some questions which need answering:

is there a dbus message emitted when a call starts ringing? (assume yes)
does it have enough info to lookup the contacts database? (assume yes)
can you get flite to play the contacts name? (assume yes)
can we use the contacts database to store custom ringtone? (assume yes)

integrate the ui with the contacts database and allow per contact selection: std/custom/named

nice little extension with minimal effort and would make people happy (based on this and other threads)
__________________
liqbase sketching the future.
like what i say? hit the Thanks, thanks!
twitter.com/lcuk
 
pillar's Avatar
Posts: 154 | Thanked: 124 times | Joined on Mar 2007
#17
@lcuk Dbus message is emitted and it contains the phone number, which is enough to look for the contact. I'm not familiar with flite, have been using espeak to test this. No idea about the contacts database being able to store custom ringtones. It would also need a way to override the original completely.
I am all for it though, if someone can help to override the ringtone!

@Matan: I haven't tried with mplayer, only with espeak and alwayson. Maybe I should try with mplayer too since with espeak just saying a name can go pretty fast and is not ideal for troubleshooting the issue. Thanks.
 
volt's Avatar
Posts: 1,309 | Thanked: 1,187 times | Joined on Nov 2008
#18
Neat thread, real progress on a somewhat important feature. Kudos.
 
gobuki's Avatar
Posts: 60 | Thanked: 46 times | Joined on Jan 2010 @ Europe
#19
Here is a little script i hacked together that does ... or better ... would speak the number of the caller.

Code:
#!/usr/bin/env python
import gobject, dbus
from dbus.mainloop.glib import DBusGMainLoop
from subprocess import call
from subprocess import Popen

tempfile = "/tmp/espeak.tmp.wav"

def handle_call(obj_path, callernumber):
    if (callernumber != ''):
        print "%s is calling" % callernumber
        speak("%s is calling" % callernumber)
    else:
        print "caller id not submitted"
        speak("unknown caller")
        

def speak(msg):
  call(["/usr/bin/espeak", "-w", tempfile, msg])
  call(["/usr/bin/mplayer","-ao","pulse", tempfile])
   
speak("waiting for incoming calls")   
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(handle_call, path='/com/nokia/csd/call', dbus_interface='com.nokia.csd.Call', signal_name='Coming')
gobject.MainLoop().run()
I use the this dirty tempfile hack because i don't know a way (if there is one) to make espeak use pulse.
The only real problem is i can't get mplayer to keep playing. When a call is coming in while i listen to something, at first i get .4s silence, then the ringtone is played. And if i quickly hang up the last digits of the caller id are spoken.

I put this into my /etc/pulse/xpolicy.conf and rebooted btw. But it didn't help.
Code:
[stream]
exe   = mplayer
group = alwayson
Edit:

I tried group = ringtone. That didn't work either.

You might also want to take a look at Arto Rusanens eSpeakCaller which is more of a real implementation than this script. I just discovered it through this thread: http://talk.maemo.org/showthread.php?t=34982
__________________
Zen master ordering a hotdog: "Make me one with all!"

Last edited by gobuki; 2010-03-23 at 00:46. Reason: typo
 

The Following 4 Users Say Thank You to gobuki For This Useful Post:
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#20
I'm not sure if this has been suggested before, I understand little of the above. Still, I waa thinking:

If e-speak is hard to run but mplayer works, how about pre-rendered wave files? Some program runs through all the numbers and renders a number.wav with contact name in it.

No need to look anything up at ring time, just get the incoming number and play the number.wav. E.g. 0123456789.mp3/wav/whatever would have a voice that says "Jim" in plain English.
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
Reply


 
Forum Jump


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