FYI: Text to Speech FreePBX Module

mruge

Guru
Joined
Jan 28, 2008
Messages
121
Reaction score
0
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?

I agree... That sounds like a great idea.
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
By all means. Perhaps some additions could be Voice Selection, Pitch and Speed.
A better naming convention, making the wav file titled as the TTS Description.
 

mspieker

New Member
Joined
Jan 6, 2009
Messages
57
Reaction score
0
Works great! I love it! However now on the FREEPBX system status page I get a warning for a bad destination, and it says its my destination that I'm using for my TTS. Anyone else seeing that?
 

mspieker

New Member
Joined
Jan 6, 2009
Messages
57
Reaction score
0
Is anyone else getting this "bad destinations" now on the status page if you use a TTS as a destination?
 

rapidnet

New Member
Joined
Jul 22, 2008
Messages
64
Reaction score
0
Are you still seeing this?
I am seeing the same behavior, and the TTS is not working either.

I just started looking at why...

Any infor you want to troubleshoot?

Update -- It's working now. I created what appeared to be the output directory it was looking for...
 

rapidnet

New Member
Joined
Jul 22, 2008
Messages
64
Reaction score
0
I just noticed that there is a limit to the amount of text you can parse. IT seems to be about 250 characters. I was trying to do a rather large announcement, and it was being truncated by the web gui...
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
freepbx.org/trac/ticket/1012#comment:13
Author: JakFrost?
Modified: 2009-11-04
Version: 1.1
Change: Disabled AlphaNum? Check on TTSText in "page.tts.php".
Note: Disabled alphanumeric content check for TextToSpeech input box text in "page.tts.php". The variable TTSText (aka $ttstext) is now Quoted Printable escaped as per RFC2045 to allow safe transfer of all special meta characters for XML and especially "," and "|". This allows safe transfer of text through Asterisk Gateway Interface and safe inclusion into the Asterisk Dialplan (/etc/asterisk/extensions_additional.conf) file to allow usage of XML formatted Speech Synthesis Markup Language (SSML) tags that are supported by Cepstral swift voice engine to control the emphasis, pitch, break time, and type of voice used for the text to be pronounced from the input box. Read the reference links below on how to change and improve the sounds of the Cepstral voices with SSML XML tags.
Change: Changed the order of $argv[1] and [2] for $engine and $text in "functions.inc.php" and "agi/propolys.php.agi" to make it easier to locate the engine name in the debug log "/var/log/asterisk/full".
Change: Changed the order of TTS engine discovery and enumeration to sort by the best sounding engine first on the web page drop down menu. Before: "text2wave", "flite", "swift"; After: "swift", "flite", "text2wave".

11/04/09 22:11:42 changed by JakFrost

Long story short... You can now use any type of punctuation and markup you wish inside the Text box for your Text To Speech entries.
Check out the SSML tags now available for usage with Cepstral by visiting the links above. freepbx.org/trac/ticket/1012#comment:13
freepbx.org/trac/ticket/1012#comment:13
freepbx.org/trac/ticket/1012

Download Update
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
No Engine listed in pull-down box...

I have Cepstral installed -- works fine from bash prompt...

Any ideas?
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
1.2.0.0 - Major Update
Readme: /var/www/html/admin/modules/texttospeech/README
Modder: JakFrost?
Modified: 2009-11-07
Add: Deletion old of sound files when Text To Speech entries are deleted or updated.
Add: Addition of the espeak voice engine.
Add: README file in "/var/www/html/admin/modules/texttospeech/" with detailed descriptions, changelog, and instructions on how to install all the available sound engines.
Change: Changed all external "tts" acronyms to legible "texttospeech".
Change: Legible filenames on sound files instead of illegible MD5 sum hash names.
Change: Text stored singly in text file of unlimited size supporting plain text and XML with all punctuation and markup.
Change: Passing of Name and Engine through AGI calls in "extensions_addition.conf" and not the actual Text removing limits on size and punctuation usage.
Change: Major code clean-up and re-write, addition of comments to the code and updates to all function and variable names to create consistency.
Remove: No more base64 text encoding necessary for AGI pass-through that was added in quicky version 1.1.
Remove: Hash information is no longer useful when sound and text files are deleted on entry updates and deletions.
Limit: Name for TextToSpeech entry is still limited to AlphaNum? (a-z A-Z 0-9) and Underscore (_) and Dash (-) with no spaces due to problems with spaces or special characters in "$AGI->stream_file( $soundfile )" and "$AGI->exec( Playback, $soundfile )" calls and the inability of these AGI calls to accept single or double quoted file names or PHP "escapeshellarg" or "escapeshellcmd" encoded filenames. Nothing I can do about this limitation in Asterisk 1.4.

Interesting read by Jack Frost on this project here

Link to update here
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
Duh... but it does not show in the Pulldown in FreePBX...
 

JakFrost

Guru
Joined
Nov 8, 2009
Messages
1
Reaction score
0
Duh... but it does not show in the Pulldown in FreePBX...

The problem is that the Cepstral installer does not place the binary "swift" into any of the folders that are in the PATH so in the beginning you can only execute swift through "/opt/swift/bin/swift". To solve this make a link to "/usr/local/bin" so that it appears in the PATH. The instructions are in the README along with instructions on how to install all the other engines supported by this module.

eSpeak was added also, so now there 4-voice engines to use. Personally, I just prefer Cepstral Diane-8kHz and for $29.99 USD it is a small price to pay for deploying TextToSpeech in a business production environment with complex IVR menu system.



Code:
ln -s /opt/swift/bin/swift /usr/bin/swift
ln -s /usr/bin/swift /usr/local/bin/swift
This version (1.2.0.0) still uses the original 1.0 script's method of finding the binaries by issuing a "which $engine" shell command to get the location from a folder that is in the environment PATH variable.

This same problem bugged me just like you when I first installed Cepstral and one of the other engines since the module would not detect it. It was farking annoying especially since I'm a complete Linux newbie with only 1-week experience using the system and I'm not familiar with it at all. (All these damned bin locations and every single package installs into a completely different place "/opt", "/usr", "/var", "/usr/local", give me plain and simple one single "C:\Programs" folder thank you! :D (Joking, I read something about each location having a purpose in the Linux Standards Base after this issue looking into these many folders.)

In the next release I'll look into changing the engine detection method to also include a direct look into each engine's default installation folder for the binary. I'll add it to the list of improvements for this module so that the need for the links won't be necessary since most folks shouldn't have to read the README to make this thing work, it should be Install-and-Use because that's the way I want it for myself, automatic, simple, and ready to go. Won't be able to make the change till next week, busy studying now.

PS: JakFrost checking in here, I wrote the version 1.1 and 1.2.0.0 of this TextToSpeech FreePBX module after _XO_ wrote the 1.0 proof-of-concept code. There will be a new version coming out in a few days/weeks with additional improvements. I came across this thread about my own module when I was searching for other TextToSpeech solutions for FreePBX, what a loopy web this is. :)
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
The problem is that the Cepstral installer does not place the binary "swift" into any of the folders that are in the PATH so in the beginning you can only execute swift through "/opt/swift/bin/swift". To solve this make a link to "/usr/local/bin" so that it appears in the PATH. The instructions are in the README along with instructions on how to install all the other engines supported by this module.

eSpeak was added also, so now there 4-voice engines to use. Personally, I just prefer Cepstral Diane-8kHz and for $29.99 USD it is a small price to pay for deploying TextToSpeech in a business production environment with complex IVR menu system.



Code:
ln -s /opt/swift/bin/swift /usr/bin/swift
ln -s /usr/bin/swift /usr/local/bin/swift
This version (1.2.0.0) still uses the original 1.0 script's method of finding the binaries by issuing a "which $engine" shell command to get the location from a folder that is in the environment PATH variable.

This same problem bugged me just like you when I first installed Cepstral and one of the other engines since the module would not detect it. It was farking annoying especially since I'm a complete Linux newbie with only 1-week experience using the system and I'm not familiar with it at all. (All these damned bin locations and every single package installs into a completely different place "/opt", "/usr", "/var", "/usr/local", give me plain and simple one single "C:\Programs" folder thank you! :D (Joking, I read something about each location having a purpose in the Linux Standards Base after this issue looking into these many folders.)

In the next release I'll look into changing the engine detection method to also include a direct look into each engine's default installation folder for the binary. I'll add it to the list of improvements for this module so that the need for the links won't be necessary since most folks shouldn't have to read the README to make this thing work, it should be Install-and-Use because that's the way I want it for myself, automatic, simple, and ready to go. Won't be able to make the change till next week, busy studying now.

PS: JakFrost checking in here, I wrote the version 1.1 and 1.2.0.0 of this TextToSpeech FreePBX module after _XO_ wrote the 1.0 proof-of-concept code. There will be a new version coming out in a few days/weeks with additional improvements. I came across this thread about my own module when I was searching for other TextToSpeech solutions for FreePBX, what a loopy web this is. :)
Thanks JakFrost,

However,

here's what I get:

root@pbx:~ $ ln -s /opt/swift/bin/swift /usr/bin/swift
ln: creating symbolic link `/usr/bin/swift' to `/opt/swift/bin/swift': File exists
root@pbx:~ $ ln -s /usr/bin/swift /usr/local/bin/swift
ln: creating symbolic link `/usr/local/bin/swift' to `/usr/bin/swift': File exists
root@pbx:~ $

And still nothing shows in the dropdown.

Gerry
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
Welcome JakFrost. I think I sent you an email inviting you over here via FreePBX site. I see you've made it here anyhow.
Thanks for your work on updating this module. I'm sure you'll find lots of information and inspiration here.
Again, thanks for your work.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
I have downloaded and installed Diane-8kHz and William-8kHz but only Diane is recognized. When in the Texttospeech module (JakFrost version??) I try to put voice=William-8kHz or voice="William-8kHz" I get nothing

Using *1.8/FPBX 2.8/PiaF Purple with the texttospeech 1.3??

I have not tried voice='William-8kHz' (using single quote) yet

I also heard Callie-8kHz with slow/liquid love is a better voice so aside from DL callie how would I put that in this module.

Thx
 

Members online

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
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