We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

TTS Voice and Date

Questions and answers about Plum Survey

Moderators: admin, support

Post Reply
gregoryclark
Posts: 12
Joined: Mon Nov 12, 2012 3:20 pm

TTS Voice and Date

Post by gregoryclark »

Greetings!!!

A somewhat complicated question: We launched an IVR survey a couple of months ago. The basis of the survey is to contact recent patients for a dental clinic with a large clientele. A problem has arisen: quite often an individual will have two appointments in a short span of time, where they have the initial visit and find out they need further dental work requiring a follow-up. Now, the first visit may have been great and the second terrible, but the data has triggered a contact survey nonetheless. We are trying to find a way to populate the date into the survey and have the TTS recognize it and relate it to the respondent of the survey. Here is the first question: Is there a way to populate a date into the contact data so that the system recognizes the the specific date of visit? Second question: Can you program into the IVR survey a way for the TTS voice module to then recognize that date on each respective survey and relate the date verbatim? In other words, if we found a way to populate the date of visit, is there a way to allow the TTS to recognize that populated date and relate in the IVR to the patient accurately?

Simply put, we need a way to let the patient know of which visit the survey is referencing by the date of the visit.

Please let me know if additional clarification is needed for my inquiry.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: TTS Voice and Date

Post by support »

Hi,

There is a way to play this dynamic date, however, it cannot be done fully within the survey tool. You will need to create a VXML script that will determine the correct date and play that information to the caller. You would access the script via the "subdialog (phone only)" survey question. Here's an example subdialog to handles what you're requesting.

Code: Select all

<?php
header("Content-type: text/xml");
include ("../lib/lib.php");
echo "<?xml version=\"1.0\"?>";
$date = determine_date($_POST['ani']); // Expected format: MM/DD/YYYY
?>

<vxml version="2.0">
  <form id="date">
    <block>
      <prompt> This call is related to your visit on 
        <say-as type="date">
          <?= $date ?>
        </say-as>
      </prompt>

      <var name="result" expr="'<?= $date ?>'"/>
      <return namelist="result"/>
    </block>
  </form>
</vxml>
If the expected date is 01/21/2013 this subdialog will play a TTS statement "This call is related to your visit on January 21st, 2013." It will then add the date as the answer for the subdialog question for your reports. The determine_date method will need to do a lookup on your back-end to determine the correct visit date to play.

Hope this helps.

Regards,
Plum Support

gregoryclark
Posts: 12
Joined: Mon Nov 12, 2012 3:20 pm

Re: TTS Voice and Date

Post by gregoryclark »

Thank you for that response.

Follow up question: If you apply this to a Spanish-only survey, will it work just as well. Is there any particular programming involved in order for the TTS to read in Spanish?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: TTS Voice and Date

Post by support »

Hi,

There will be some modifications necessary for this subdialog to work in Spanish. You'll want to verify what TTS engine you are currently using for your surveys. This can be found within Survey Settings > Phone Options > TTS voice module. Once you know what voice you're using, you can find the TTS engine information in the VXML documentation.

The Spanish version of the subdialog (example uses Rosa from AT&T Natural Voices) would look like this:

Code: Select all

<?php
header("Content-type: text/xml");
include ("../lib/lib.php");
echo "<?xml version=\"1.0\"?>";
$date = determine_date($_POST['ani']); // Expected format: DD/MM/YYYY
?>

<vxml version="2.0">
  <form id="date">
    <block>
      <prompt>
        <speak xml:lang="es_us">
          <voice name="'rosa'">
            <!-- Spanish translation for this sentence. -->
            This call is related to your visit on 
            <say-as type="date">
              <?= $date ?>
            </say-as>
          </voice>
        </speak>
      </prompt>

      <var name="result" expr="'<?= $date ?>'"/>
      <return namelist="result"/>
    </block>
  </form>
</vxml>
Please note that the determine_date format is different in Spanish than English. English needs the format in MM/DD/YYYY while Spanish needs it in DD/MM/YYYY.

Hope this helps.

Regards,
Plum Support

Post Reply