How to configure vicidial voice broadcast campaign with Google TTS

vicidial voice broadcast campaign with Google TTS

Topic : How to configure vicidial voice broadcast campaign with Google TTS
vicidial google text to speech



  INTRO:

In this blog i am going to show you how to create voice broadcast campaign in vicidial with Google text to speech.(an alternate to the cepstral Text to speech.)
Comparing to cepstral ,google voice quality will not be soo good but it will be in satisfied level.

ViCidial:
VICIDIAL is a software suite that is designed to interact with the Asterisk Open-Source PBX Phone system to act as a complete inbound/outbound contact center suite with inbound email support as well.
which supports voice broadcast campaign, press 1 survey campaign, and predictive dial campaigns.

Google TTS agi:

Youtube Video guide  LINK

Google TTS is open source as of dated jan 2021
We 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/

  What is Voice Broadcasting?

Voice broadcasting is the ability to communicate and connect with people on a large scale. It can be defined as a mass communication technique that broadcasts telephone messages to hundreds or thousands of call recipients at once.
With voice broadcasting, you can pre-record and send automated voice calls to phone numbers using a centralized system and phone number. It allows the call recipients to listen to the recorded message and interact by pressing keys on their keypad

Steps :
we will following the below steps, as i am using vicibox , the commands are based on open suse OS.

  Step 1: Installing the Pre-requisites

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"

(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
---now we need to copy the agi to asterisk agi-bin folder

cd asterisk-googletts
cp googletts.agi /var/lib/asterisk/agi-bin/
chmod 755 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 => 778899,1,Answer()
exten => 778899,n,Wait(2)
exten => 778899,n,agi(googletts.agi,"hello, mr.${first_name} your credit card due date is ${date_of_birth}",en)
exten => 778899,n,agi(googletts.agi,"if already paid kindly discard this call, have a nice day",en)
exten => 778899,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 778899 as line extension in remote agents 

  Conclusion

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

For support reach me at skype:striker24x7

6 Comments
  • Unknown
    Unknown February 17, 2021 at 11:33 AM

    how to speak value "123456" using google tts agi.

    • Ajit Kumar
      Ajit Kumar February 17, 2021 at 5:33 PM

      to speak as number 1lakh 23thousand 4hunder fifty six
      just use 123456
      to speak as digit 1 2 3 4 5 6 give space
      or use asterisk defautl saydigits(123456)

    • Unknown
      Unknown February 17, 2021 at 5:46 PM

      thanks for reply,
      requirement is to speak mobile number using googletts.agi
      as i tried ssml is not supporting.
      exten => s,n,agi(googletts.agi,You have entered, ${mobileno},hi)
      i hope you understand my query.

    • Unknown
      Unknown February 17, 2021 at 8:10 PM

      need digit output only for variable value.(mobile number)

  • Unknown
    Unknown February 18, 2021 at 12:18 PM

    agi-set_variables.agi adding + sign for space value
    Postby anilbakhtani » Thu Feb 18, 2021 6:43 am

    Hi
    in dialplan , we are using agi-set_variables.agi agi
    it is converting space value to +sign.
    like database value Anil kumar is converting to anil+kumar.

    exten => _9586.,1,AGI(agi://127.0.0.1:4577/call_log)
    exten => _9586.,n,AGI(agi-set_variables.agi)


    pls guide.

  • Anonymous
    Anonymous July 10, 2021 at 5:07 AM

    Hi,
    thank you for share.

    any idea why the vicidial only supports a call with google tts?
    If I send more than one call, the audio is choppy.

Add Comment
comment url