login | register
Tue 07 of Oct, 2008 [13:29 UTC]

voip-info.org

Asterisk Bounty Email TTS

Created by: sjobeck,Last modification on Wed 02 of Jan, 2008 [19:25 UTC] by sdjernes

Bounty: Email Text-To-Speech (listen to your email from inside the voicemail menu)


  • maintainer: Sjobeck
  • opening date: 2005july19
  • status: open
  • total value: $150 (& expected to grow fast)
  • contributors: sjobeck ($50), Mchapman ($100), ?, ?, ?, ?

Description

This is the initial page creation, and this will b edited by me & others hopefully a lot more times in the coming days & weeks.

What we are essentially talking about here (no pun intended) is the ability to call in to the PBX voicemail menu, like always, but have another option there to listen to email. Perhaps there could be a "listen to all email" or a "listen to new email" choice. IMAP would have the ability to know which email were new. IMAP would also have the ability to toggle that message as "heard"/read or not, or mark it "new"/unread, when you were done listening to it, but this advanced marking of messages could be left til later.

There is no timelime for this bounty whatsoever. Just sometime in this lightyear. It is understood that this is no trivial task & would involve the synthesis of a handful of technologies & softwares in to one complex lump of functionality.

Please edit this page if you have something intelligent to add. If youre not sure, please post a comment at the bottom of the page, and (since I monitor the page), will be notified, will see it, and add the gist of the comment to the page.

Peace. Love. Linux.

I will be posting this URL to the lists today. I will try to get some more money out of those here and add to the very humble starting bounty I have posted. Please lobby the powers that be at your organization for a contribution, especially from the executives, who would most likey love this one.


This site no longer exists! FYI This already exists: http://www.miselconsulting.com/
And here for MS Exchange http://www.adomo.com/ - very slick sample if you want to examine it. Based in large on FOSS tech from what I could discern.
Note: having examined this, it appears adomo is providing the opposite: get your voice mail delivered to your email inbox.

Comments

Comments Filter
222

333MailCall for Asterisk

by UncleWard, Friday 11 of August, 2006 [17:28:18 UTC]
MailCall for Asterisk does much the same thing ... for free. Here's the link: http://nerdvittles.com/index.php?p=141

222

333Asterisk Bounty Email TTS AGI script

by kFuQ, Wednesday 05 of July, 2006 [14:45:36 UTC]

from: oldskoolphreak <-- thanks natas


#!/usr/bin/perl
#AGI Script that reads back e-mail from an IMAP account.
#Requires the Asterisk::AGI Net::IMAP::Simple, and Email::Simple modules.
#Written by: Black Rathchet (blackratchet@blackratchet.org)
#http://www.oldskoolphreak.com

use Net::IMAP::Simple;
use Email::Simple;
use Asterisk::AGI;
use File::Basename;
use Digest::MD5 qw(md5_hex);

my $server = 'localhost'; #INSERT YOUR SERVER HERE
my $username = 'mailuser'; #INSERT YOUR USERNAME HERE
my $password = 'password'; #INSERT YOUR PASSWORD HERE

sub speak(){
   $text = $_[0];

   my $hash = md5_hex($text);

   my $ttsdir = "/var/lib/asterisk/sounds/tts";
   my $cepoptions = "-p audio/sampling-rate=8000,audio/channels=1";

     my $wavefile = "$ttsdir/tts-$hash.wav";

     unless (-f $wavefile) {

         open(fileOUT, ">/var/lib/asterisk/sounds/tts/say-text-$hash.txt");
         print fileOUT "$text";
         close(fileOUT);

         my $execf="/opt/swift/bin/swift -f $ttsdir/say-text-$hash.txt -o $wavefile $cepoptions";
         system($execf);

       unlink("$ttsdir/say-text-$hash.txt");
   }
   $filename = 'tts/'.basename('tts/'.basename($wavefile,".wav"));
   $AGI->stream_file($filename);
   unlink("$wavefile");
}

$AGI = new Asterisk::AGI;

my %input = $AGI->ReadParse();

# Create the object
my $imap = Net::IMAP::Simple->new($server) ||
die "Unable to connect to IMAP: $Net::IMAP::Simple::errstr\n";

# Log on
if(!$imap->login($username,$password)){
&speak("Login failed: " . $imap->errstr . "\n");
exit(64);
}

# Print the subject's of all the messages in the INBOX
my $nm = $imap->select('INBOX');
$AGI->stream_file('vm-youhave');
$AGI->say_number($nm);
#$AGI->stream_file('vm-INBOX');
$AGI->stream_file('vm-messages');

for(my $i = 1; $i <= $nm; $i++){

my $es = Email::Simple->new(join '', @{ $imap->top($i) } );

$AGI->stream_file('vm-message');
$AGI->say_number($i);
&speak($es->header('Subject'));
$AGI->stream_file('vm-from');
&speak($es->header('From'));
&speak("1, Play, 2, Next, Pound, Exit");
}

$imap->quit;