FYI: Text to Speech FreePBX Module

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
Description: This module supports Festival / Flite and Cepstral text to speech engines (autodetect and let the user choose which engine he wants to use). A TTS record can be used as a destination and can be linked to another destination after being played.

Install Text to Speech

1. Download from here to your computer. DO NOT decompress.
2. Go to Module Admin page in FreePBX and Upload Module.
3. Find Module in list and Install.
4. Reload


I've been using it for a while and it works as advertised. It does not allow punctuation. Maybe someone can fix that.

Update:

Clampron posted a fix for the punctuation issue on the freepbx site.

Hi jpe - I just ran into the same thing with allowing Punctuation. Here's a quick fix. Save a copy of the module on your local computer and extract tts-1.0.tgz One of the PHP files is page.tts.php Open this file with a text editor and drop off one of the last IF statements. It is the one that looks like:
Code:
if (!isAlphanumeric(theForm.text.value))[INDENT]  return warnInvalid(theForm.text, msgInvalidTTSText); 
 [/INDENT]
Uninstall your first module and reinstall with the edited version. I did notice that if you use a comma it will NOT work correctly, BUT you can use a period instead with a similar effect. Hope this helps - I just spend all day working on this!

Apply the fix and we get period pauses. As he says, commas will cause it not to speak.
 

TheShniz

Guru
Joined
Nov 15, 2007
Messages
560
Reaction score
2
This is a very interesting module, but could you give some examples on potential applications... as in, what would you use this for?
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
I originally used it when I had the recording studio going. I would make announcements to let clients know status of the studio via CID.
ie: Your session is delayed by 2 hours. etc, things like that. Anything that a client needed to know and could be answered by calling.
This way I wouldn't have to call them or get disturbed to answer the phone to tell them.

Pretty much anything that you would use the announcement module for, this lets you use the tts engine.

I think a nice advncement to it would be to allow one to set the voice parameters, ie voice, speed etc. I didn't write it and don't have the knowledge to modify.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
WOW - that's a very exciting module! I wish I had thought of it. :)

This has an amazing number of applications. Movie theater, temporary service announcements, even a rudimentary scheduling service could be worked around this. Jerry adn I will look into it and see what could be done about the punctuation issue.
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
Works great

I'm using it with Cepstral, and it works great. However, the punctuation is real problem. You can't have it say more than one sentence, as you need the period to insert a pause.

I presume the problem is a bug in what was written for the module? Why in the heck would punctuation not be allowed?

I know Cepstral voices for the desktop support xml tags. If we can get around the punctuation issues with this module, those could come in useful if they work with the Linux version of Cepstral.

Very nice module, indeed!
 

mrh

Member
Joined
Oct 25, 2008
Messages
56
Reaction score
1
Maybe my novice status.... but I'm having trouble installing the module.

I use the module admin, but I get...

"The following error(s) occurred processing the uploaded file:
  • Error untaring uploaded file. Must be a tar+gzip file"
Am I making a basic error?

Many thanks

Matthew
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Windows has a nasty habit of removing file extensions, particularly tgz and tar.gz files.

can you check that your module name has not been "adjusted" by windows.

Joe
 

mrh

Member
Joined
Oct 25, 2008
Messages
56
Reaction score
1
Cheers Joe,

Windows has it as ...

"tts-1.0.tgz"

Hope this helps,


Matthew
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Maybe my novice status.... but I'm having trouble installing the module.

I use the module admin, but I get...

"The following error(s) occurred processing the uploaded file:
  • Error untaring uploaded file. Must be a tar+gzip file"
Am I making a basic error?

Many thanks

Matthew

Matthew - is this on PBXIAF? I really thought Joe's answer was gonna get you going.
 

mrh

Member
Joined
Oct 25, 2008
Messages
56
Reaction score
1
Hi guys,

Apologies for the delay.

Yep - running PIAF here!

Cheers

Matthew
 

mrh

Member
Joined
Oct 25, 2008
Messages
56
Reaction score
1
Just tried it on a fresh PIAF 1.4 install...

Same problem!
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
This one is making me crazy - I cant duplicate your results.

I could post the version I am using and see if it works for you - but its just 1.0 plain and direct from the repository at FreePBX. Is that where your getting yours? Are you downloading it directly to your pbx, or going through windows first?
 

mrh

Member
Joined
Oct 25, 2008
Messages
56
Reaction score
1
This one is making me crazy - I cant duplicate your results.

I could post the version I am using and see if it works for you - but its just 1.0 plain and direct from the repository at FreePBX. Is that where your getting yours? Are you downloading it directly to your pbx, or going through windows first?


Good News!

Finally fixed it.

Fired up a good old dos prompt and renamed it... ... to

"tts-1.0.tgz"

(was getting desparate at this point!)

Then, for some reason, it installed fine.

So I now have a fully working TTS module using my Cepstral UK voice!

Result!

Just need punctuation now!

Thanks for the persistence!


Cheers


Matthew
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

I still reckon that Windows was mucking around with your file extension naming.

Joe
 

steve54301

Guru
Joined
Jun 7, 2008
Messages
135
Reaction score
18
I'm having problems as well. I even retrieved the file with wget, but am unable to decompress it. tar and the freepbx module uploader don't see it as a valid tar+gz file.
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
It works perfect on every machine I try it on. (the module file).

WHERE is puncuation? I love the module but WHY OH WHY does it not accept punctuation? I can use the command line and do anything I want. It's a silly restriction in the module.
 

steve54301

Guru
Joined
Jun 7, 2008
Messages
135
Reaction score
18
Works.. I was just being hasty trying to wget from the URL posted, or right click save-as... You best click a few times on the posted attached file. It's one of those dynamic URLs.
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
Clampron posted a fix for the punctuation issue on the freepbx site.

Hi jpe - I just ran into the same thing with allowing Punctuation. Here's a quick fix. Save a copy of the module on your local computer and extract tts-1.0.tgz One of the PHP files is page.tts.php Open this file with a text editor and drop off one of the last IF statements. It is the one that looks like:
Code:
if (!isAlphanumeric(theForm.text.value)) [INDENT]  return warnInvalid(theForm.text, msgInvalidTTSText); 
[/INDENT]
Uninstall your first module and reinstall with the edited version. I did notice that if you use a comma it will NOT work correctly, BUT you can use a period instead with a similar effect. Hope this helps - I just spend all day working on this!
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Shall we roll this into our own PBXIAF version of the module?

I was also thinking it should be possible to put a control in the web ui so the end user can decide if they want the punctuation filter left in place, or turned off.

What does everyone think?
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
That sounds great. It makes perfect sense. I notice that Allison speaks pretty fast if you're speaking more than a single sentence or prompt. it would be cool -- not necessary -- to add a speed tag using ssml if speaking more than simple stuff.

Just a thought.
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top