Resource icon

PIONEERS Custom IBM Voice Prompts for Asterisk and 3CX

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Adding MP3 SOX Support to Incredible PBX 13-13 - This tutorial will walk you through adding MP3 support to SOX for Incredible PBX 13-13

Here are the steps to add MP3 support to SOX on the Incredible PBX 13-13 (CentOS) platform. Begin by logging into the Linux CLI as root. Then...
Code:
yum -y remove sox
yum -y install gcc-c++ libmad libmad-devel libid3tag libid3tag-devel lame lame-devel flac-devel libvorbis-devel
cd /usr/src
wget https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2.tar.gz
tar zxvf sox-14.4.2.tar.gz
rm -f sox-14.4.2.tar.gz
cd sox*
./configure
make -s
make install
ldconfig
ln -s /usr/local/bin/sox /usr/bin/sox

Read more about this resource...
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
DQ83T54VQAAktJC.jpg


SoX 14.4.2 is a prerequisite to generate new IBM Voice Prompts suitable for Asterisk or 3CX using Incredible PBX 13-13 on the CentOS platform.

You also must obtain IBM TTS credentials. One million characters of text-to-speech synthesis is FREE every month forever! See this tutorial for details.

Once you have SoX 14.4.2 installed, here's how to install the IBM Voice Prompts script:
Code:
cd /root
wget http://incrediblepbx.com/ibmprompt.tar.gz
tar zxvf ibmprompt.tar.gz
rm -f ibmprompt.tar.gz
# insert your IBM TTS credentials in the script and save it
nano -w ibmprompt.php
# generate your first voice prompt
./ibmprompt.php "Text of your voice prompt"
 
Last edited:

piaftnt

Member
Joined
Jul 16, 2010
Messages
93
Reaction score
17
I just tried the above and it works as advertised.
Thanks for anticipating my next feature request, before I had a chance to ask for it.
Have you taken up mind reading? :)
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
hmmmm any ideas?
Code:
./ibmprompt.php "This is a test of TTS"
Generating Voice Prompt: This is a test of TTS
sox WARN mp3-util: MAD lost sync
sox FAIL formats: can't open input file `/tmp/voiceprompt.mp3':
Your new voice prompt is ready: voiceprompt.wav
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Looks like there was no MP3 file generated. Are you sure your TTS credentials are correct?? These are NOT the same as your STT credentials.
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
Doh! *exactly* I was using the STT credential! BTW, loving 13-13 so far!
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
Double DOH!! Well, I mostly use VPS, and most are CentOS; I have seen Polly working on CentOS7, but none of the providers offer it.

I should have known you would be on top of it. That's the benefit of being "retired", right?
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
The script says "sox FAIL formats: no handler for file extension `mp3'" and file voiceprompt.wav does not exist.

I am aware the article above is probably outdated but I did not find instructions to just install IBM Watson TTS on an existing incredible pbx platform without enchilada.

Current platform:
Incredible PBX/FAX 13-13.10 for CentOS 6
Asterisk 13.25.0
Incredible 13.0.122.60

Here is what I did:
1. Created IBM Cloud Text to Speech credentials as per the new api and LITE pricing plan following instructions here.
2. Added MP3 support and installed the voice prompts script for TTS following instructions here
3. Entered and verified credentials in /root/ibmprompt.php as mentioned here:
$IBM_username = "apikey";
$IBM_password = "MY IBM CLOUD TEXT API KEY";
$IBM_url = "https://gateway-lon.watsonplatform.net/text-to-speech/api";
4. cd /root
5. ./ibmprompt.php "Welcome to IBM Cloud Text"
Code:
$  ./ibmprompt.php "Welcome to IBM Cloud Text"
Generating Voice Prompt: Welcome to IBM Cloud Text
sox FAIL formats: no handler for file extension `mp3'
Your new voice prompt is ready: voiceprompt.wav

Any tips to fix this or to install a current version of IBM TTS appreciated.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
@Rrrr

See if you have libsox-fmt-mp3 installed (or something similarly named). Not sure what CentOS 6 would call it.
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
@randy7376 Thanks, I am not sure how. Here's what I did:
Code:
$  yum list installed | grep libsox*
libsoup.x86_64                         2.34.3-5.el6                 @base
libsoup-devel.x86_64                   2.34.3-5.el6                 @base
$  yum list installed | grep libsox-fmt-mp3
$  yum list installed | grep libsox-fmt-mp3*
$  yum list installed | grep libsox-fmt*
$  yum list installed | grep libsox-*

But from the below log (instructions from here), it's clear that MP3 is not being installed.
These were the instructions:
Code:
yum -y remove sox
yum -y install libmad libmad-devel libid3tag libid3tag-devel lame lame-devel flac-devel
cd /usr/src
wget https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2.tar.gz
tar zxvf sox-14.4.2.tar.gz
rm -f sox-14.4.2.tar.gz
cd sox*
./configure
make -s
make install
ldconfig
ln -s /usr/local/bin/sox /usr/bin/sox
Log (partial):
Code:
...
--> Finished Dependency Resolution
Error: Package: lame-devel-3.99.5-1.el6.rf.x86_64 (rpmforge)
           Requires: lame = 3.99.5-1.el6.rf
           Installed: lame-3.100-1.el6.x86_64 (@epel)
               lame = 3.100-1.el6
           Available: lame-3.98.4-1.el6.rf.x86_64 (rpmforge)
               lame = 3.98.4-1.el6.rf
           Available: lame-3.99.4-1.el6.rf.x86_64 (rpmforge)
               lame = 3.99.4-1.el6.rf
           Available: lame-3.99.4-2.el6.rf.x86_64 (rpmforge)
               lame = 3.99.4-2.el6.rf
           Available: lame-3.99.5-1.el6.rf.x86_64 (rpmforge)
               lame = 3.99.5-1.el6.rf
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodiges
...

and:
Code:
...
OPTIONAL FILE FORMATS
amrnb......................no
amrwb......................no
flac.......................no
gsm........................yes (external)
lpc10......................yes (in-tree)
mp2/mp3....................no
 id3tag....................no
 lame......................no
 mad.......................no
 twolame...................no
oggvorbis..................yes
opus.......................no
sndfile....................no
wavpack....................no
...
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Update:
I managed to install mp3 and make ibmprompt.php work.

Here is what made it work (replace this line with the original line above):
Code:
yum -y install libmad libmad-devel libid3tag libid3tag-devel lame lame-devel flac-devel --skip-broken
 
Last edited:

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