PIONEERS gTTS for Debian, Rocky, and Ubuntu

Way to go Ward, much better!.

I suggest you add localizations with TLD and language for 'not-septics'
If you'd like to try out gTTS with Incredible PBX on either the Debian or Ubuntu platforms, here are the steps to use it with Weather Reports by ZIP Code (947) and News Headlines (951). It's also included in the latest Oracle Cloud build.
Code:
cd /var/lib/asterisk/agi-bin
apt-get -y install pip
apt-get -y install jq
apt-get -y install libsox-fmt-all
pip install gTTS
wget http://incrediblepbx.com/gtts.tar.gz
tar zxvf gtts.tar.gz
rm -f gtts.tar.gz
./install-gtts-dialplan.sh
 
Added LANGUAGE switch in dialplan code. Default is "en". For complete list of choices: gtts-cli --all

Now just need to rework for CentOS and Rocky platforms.
 
Deploying gTTS with Rocky 8 or CentOS 7

Code:
yum install dnf -y
dnf install python39 -y  # not required for CentOS 7
pip3 install --upgrade pip
dnf install jq -y
pip3 install gTTS

Adding gTTS Support to Incredible PBX 2022-R and Incredible PBX 2020 for CentOS 7

Code:
cd /var/lib/asterisk/agi-bin
wget http://incrediblepbx.com/gtts.tar.gz
tar zxvf gtts.tar.gz
rm -f gtts.tar.gz
./install-gtts-dialplan.sh

Dialing 947 provides Weather Reports by ZIP Code.

Dialing 951 provides Yahoo News Headlines.
 
Last edited:
Deploying gTTS with Rocky 8

Code:
dnf install python39 -y
pip3 install --upgrade pip
dnf install jq -y
pip3 install gTTS

Adding gTTS Support to Incredible PBX 2022-R

Code:
cd /var/lib/asterisk/agi-bin
wget http://incrediblepbx.com/gtts.tar.gz
tar zxvf gtts.tar.gz
rm -f gtts.tar.gz
./install-gtts-dialplan.sh

Dialing 947 provides Weather Reports by ZIP Code.

Dialing 951 provides Yahoo News Headlines.
Good job - many will be happy with this. Others might still say you're not making anything. :rolleyes:
Thanks for continuing to make things better and on with the improvements and contributions.
 
gTTS for RPi Raspbian, Debian 10 buster, & Ubuntu 20.04
Bash:
cd /var/lib/asterisk/agi-bin
apt-get update
apt-get -y install jq libsox-fmt-all

apt-get -y install python3-pip

#python -m pip install --upgrade pip
pip install --upgrade pip
pip3 install --upgrade pip
ln -s /usr/bin/pip3 /usr/bin/pip
pip install gTTS
wget http://incrediblepbx.com/gtts.tar.gz
tar zxvf gtts.tar.gz
rm -f gtts.tar.gz
./install-gtts-dialplan.sh
cd /root/
 
Last edited by a moderator:
There you, go, simple and no account config needed, but by default she speaks 'Septic English' by simply setting your preferred tld in the gtts call, she can polyglot-ally speak 'proper English' ( well 'Southern Standard British English' no Scouse or Brummie, but you can get Irish or Oz or Mumbai or Parisienne or Montreal French . . .)


I'm not sure that pip/pip3 differentiation is necessary 'gtts' is installable in both Python2 and Python3
 
Last edited:
python -V

will say your current default python version, but

python2 -V
python3 -V
ls /usr/bin/pyth*


would show all installed and preferred versions, different OS's have different ways of set ting the default, python3 is generally taken as the better choice. but quite likely python2 might still be a FreePBX thing..

I would suggest installing gtts with pip3 (apt/yum installations) which will always do the python3 thing (presuming you have python3 installed, if you don't then now would be a good time to do that) and not worry about what pip might be symlinked to.
 
Is 'pip' actually available (via apt-get ) as a 'package' somewhere? - its not in Raspbian 10 buster neither Ubuntu 20.04 Focal - hence
apt-get install -y python3-pip
python3-pip and python-pip (for 2) in the debian repos

within python itself

python -m pip install --upgrade pip

should work on either
 
I'm surprised that a stable and qualified python environment doesn't exist yet in this eco-system, I imagine that @wardmundy will fix that soon ;-) 2.7 and 3.10 would be 'hip'
 
I added an apt update and symlink to @ostridge setup above because, at least on our RasPi and Debian platforms, there was no pip command. If it exists on other platforms, the symlink will be ignored, e.g. on Ubuntu, it's already linked to pip3. Without apt update, install of pip3 will fail at least on Ubuntu.
 
Last edited:
When in doubt, both variants of python support the -m (module name) syntax, so to reduce log-jams

python3 -m pip list

python2 -m list

python -m pip list

would all return available 'modules' for the verison of pythyon you called, python2 and python3 are unambiguous calls, python is kinda 'up to you' so be careful.

So , as previously suggested

python3 -m pip install

would 'install pip3'

better is to add --upgrade pip, which should install the latest and greatest version of pip, Suybstitute 2 for 3 if you insist, then you get both

So as not further confuse this thread, unless you know better, install python and imported modules as root, and specifically nominate the python version in either thye hashtag line or the use of python2 or python3 .

If you ever get confused

cat $(which pip3)
cat $(which pip2)
cat $(which pip)

will probably not help, but will tell you WTF ;-)
 

Members online

Forum statistics

Threads
26,704
Messages
174,483
Members
20,272
Latest member
voipgreene
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.
Back
Top