Skip to main content

How to configure vicidial voice broadcast campaign with Google TTS

 

vicidial voice broadcast campaign with Google TTS


vicidial google text to speech




Google TTS agi:

Google TTS is open source as of dated jan 2021We will be using the asterisk agi provided by zaf.github to interact with google tts engine for text to speech .link to download agi 
https://zaf.github.io/asterisk-googletts/


  Step 1: Installing the Pre-requisites


Debian :-
apt-get install perl
apt install libwww-perl
sudo cpan install LWP::UserAgent
sudo cpan install LWP::Protocol::https
apt install sox
apt install mpg123
_____________________________


openSuse:-

zypper install perl

zypper install perl-libwww-perl

zypper install perl-LWP-Protocol-https

zypper install sox

zypper install mpg123

asterisk -rx  "module load format_sln.so"

(note format_sln might be pre loaded in most asterisk)


  Step 2:  Download the google tts AGI to asterisk server

link: https://zaf.github.io/asterisk-googletts/

git clone git://github.com/zaf/asterisk-googletts
or 
wget https://github.com/zaf/asterisk-googletts/zipball/master
unzip master
cd zaf-asterisk-googletts*

---now we need to copy the agi to asterisk agi-bin folder

cp googletts.agi /var/lib/asterisk/agi-bin/

chmod 755 /var/lib/asterisk/agi-bin/googletts.agi

  Step 3: Asterisk dialplan 

we need to write two dialplans.

  1. carrier dialplan

in default vicidial carrier dialplan , we need to add additional line which is used to set the vicidial lead fields as variable,which we are going use it for text to speech.

the agi name is agi-set_variables.agi provided by vicidial team


exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)

exten => _9X.,n,AGI(agi-set_variables.agi)

exten => _9X.,n,Dial(SIP/SIPTRUNK/${EXTEN:1},,Tto)

exten => _9X.,n,Hangup()


  2. custom dialplan to playback the message with google tts agi.

Either you can write this dialplan in extensions.conf or write it in vicidial custom dialplan entry
exten => 668899,1,Answer()
exten => 668899,n,Wait(2)
exten => 668899,n,agi(googletts.agi,"hello, mr.${first_name} your credit card due date is ${date_of_birth}",en)
exten => 668899,n,agi(googletts.agi,"if already paid kindly discard this call, have a nice day",en)
exten => 668899,n,Hangup()

  Step 3 : Creating Voice broadcast campaign.

For creating the voice broadcast campaign in vicidial kindly check and follow the below link

add the 668899 as line extension in remote agents 


Dial plan variable By Vicidial









TTS language Supported by Google.







    Google TTS will not support huge call volume , they might block your IP if too many connections established.



For support reach me at skype:manish.kadiya

Comments

Popular posts from this blog

Vicidial Scratch installation Alma -9

Step 1 – Download the dependencies   hostnamectl set-hostname xxxxxx.xxxxx.xxx ### Use YOUR SubDomain vi /etc/hosts ##Change domain name for actual server ip (xxx.xxx.xxx.xxx   complete domain name    subdomain only) timedatectl set-timezone Asia/Kolkata yum check-update yum update -y yum -y install epel-release yum update -y yum install git -y yum install -y kernel* sudo dnf install kernel-devel-$(uname -r) -y #Disable SELINUX sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config     reboot Step 2 – Run the Script cd /usr/src/ git clone https://github.com/manish23k/vicidial-install-scripts cd vicidial-install-scripts ####For PHP 7.4 use this script. chmod +x alma-rocky9-ast16.sh ./alma-rocky9-ast16.sh Or the Asterisk 18 version: chmod +x alma-rocky9-ast18.sh ./alma-rocky9-ast18.sh ####For PHP 8 use this script. chmod +x main-installer-php8.sh ./main-installer-php8.sh

How to delete old call logs and other logs in vicidial or goautodial.

Step 1 : SSH to the server using the Putty Step 2:   login to mysql by typing   mysql -p                    (if you dont know password try below command )               mysql -ucron -p1234 Step 3 : select the asterisk database by typing               use asterisk step 4: Run the below command to check total disk occupied by asterisk database                SELECT table_schema AS "asterisk", ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; Step 5 : Run the below command to check disk space consumed by each table in asterisk database SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "asterisk" ORDER BY (data_length + inde...

Alma 9 Vicidial Selfsign Webrtc

I am going to provide step by step guide to integrate, enable and configure the viciphone(a webrtc phone) in vicidial (also applicable to any vicidial based system) using the Self Signed SSL Certificate ,ie without a public-ip and FQDN or accessing the vicidial with internal LAN IP. 1️⃣ Install OpenSSL (if not installed) sudo dnf install -y openssl 2️⃣ Generate a Private Key openssl genpkey -algorithm RSA -out selfsigned.key -pkeyopt rsa_keygen_bits:2048 3️⃣ Create a Certificate Signing Request (CSR) openssl req -new -key selfsigned.key -out selfsigned.csr It will prompt you for details like: Country Name (e.g., IN ) State or Province (e.g., Gujarat ) Locality (City) Organization Name Common Name (Domain, e.g., example.com or your server IP) Email Address You can use localhost or an IP address if needed. 4️⃣ Generate a Self-Signed Certificate openssl x509 -req -days 365 -in selfsigned.csr -signkey selfsigned.key -out selfsigned.crt -days 365 → Valid for 1 year (Adjust as needed) ...