Resource icon

PIONEERS Custom IBM Voice Prompts for Asterisk and 3CX

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,152
Reaction score
2,632
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:
  • Like
Reactions: Jose Pinto

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,152
Reaction score
2,632


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
38
Reaction score
2
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? :)
 
  • Like
Reactions: wardmundy

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
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
15,152
Reaction score
2,632
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
642
Reaction score
98
Doh! *exactly* I was using the STT credential! BTW, loving 13-13 so far!
 
  • Like
Reactions: wardmundy

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
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?
 
  • Like
Reactions: wardmundy

Rrrr

Tink
Joined
May 28, 2009
Messages
332
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.
 

Rrrr

Tink
Joined
May 28, 2009
Messages
332
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
...
 
  • Like
Reactions: rjaiswal

Rrrr

Tink
Joined
May 28, 2009
Messages
332
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:
  • Like
Reactions: rjaiswal

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,371
Messages
137,414
Members
14,576
Latest member
emmonks