Programmable Voice

  1. Home
  2. Docs
  3. Programmable Voice
  4. How do I
  5. Change from English to Spanish TTS

Change from English to Spanish TTS

You are in charge in opening the correct VAP file before calling the PlayNumber functions. By default the Engine automatically opens the VAP file specified in CTI32Config each time a new call comes in.

If you wanted to change VAP files on the fly, you could do something like this:

//Close the existing open VAP File
if(lineData.vapHandle >= 0) 
      log.Write("{0}: Closing VAP FH:{1}",lineData.port,lineData.vapHandle);
//Open new Spanish.VAP
string vapFileName=”Spanish.VAP”;  //You may need full path
if(vapFileName.Length > 0) 
      lineData.vapHandle=cti.FileOpen(vapFileName,cti.FileFlags.O_BINARY | cti.FileFlags.O_RDONLY);
      log.Write("{0}: Opened VAP file: {1}",lineData.port,vapFileName);
Was this article helpful to you? Yes 14 No

How can we help?