Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

Play a System Prompt with a voice other than Arabella

  Thread closed by the administrator, not accepting new replies.
  • 1.  Play a System Prompt with a voice other than Arabella

    Posted 02-09-2023 06:50
    No replies, thread closed.

    I would like to have the estimated waiting time announced in an inqueue flow. We are a German speaking company and use the Genesys Enhanced TTS voice de-DE-ChristophNeural for most announcements. The Call.EstimatedWaitTime uses system prompts for the actual time indication. These are in the standard Genesys TTS with the voice Arabella. For a consistent user experience, I would like to have everything spoken in the voice de-DE-ChristophNeural. Does anyone know how I can do this?


    #Unsure/Other

    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------


  • 2.  RE: Play a System Prompt with a voice other than Arabella

    Posted 02-21-2023 23:18
    No replies, thread closed.

    Take the value of the Call.EstimatedWaitTime and read it back with ToAudioDuration(Call.EstimatedWaitTime).  That should play in the Enhanced TTS voice.



    ------------------------------
    Robert Wakefield-Carl
    TTEC Digital, LLC fka Avtex Solutions, LLC
    Contact Center Innovation Architect
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Play a System Prompt with a voice other than Arabella

    Posted 02-22-2023 06:30
    No replies, thread closed.

    Thank you Robert, I think this could work. Unfortunately I don´t know how to do it. Can you please help me with the syntax? My Flow looks like this at the moment:



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 4.  RE: Play a System Prompt with a voice other than Arabella

    Posted 02-23-2023 12:13
    No replies, thread closed.

    Instead of using the Estimated Wait Time took, use a Play Prompt with the following:  Append("Your estimated wait time is ", ToAudioDuration(Call.EstimatedWaitTime)).

    Now, if you don't want exact, then you need to pull out the duration and round up or down on it before playing back to caller.  Does that clarify it for you?



    ------------------------------
    Robert Wakefield-Carl
    TTEC Digital, LLC fka Avtex Solutions, LLC
    Contact Center Innovation Architect
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 5.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-01-2023 08:28
    Edited by Thomas Repking 03-01-2023 08:28
    No replies, thread closed.

    The Append("Your estimated wait time is ", ToAudioDuration(Call.EstimatedWaitTime)) gave me the Error: 'Append' at position 1 : There is no implementation that accepts parameters of String and Audio.

    So I did an audio sequence, the TTS part plays with the correct voice, the ToAudioDuration part still plays with Arabella



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 6.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-01-2023 09:12
    No replies, thread closed.

    Try

    Append("Your estimated wait time is ", ToString(ToAudioDuration(Call.EstimatedWaitTime)))

    instead. It looks like the Append isn't auto-casting the Audio Duration to a String.



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 7.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 02:46
    No replies, thread closed.

    Hi Paul, thank you for your answer. Unfortunately I get the error

    'ToString' at position 40 : There is no implementation that accepts a parameter of type Audio.

    when I try it.



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 8.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 09:12
    No replies, thread closed.

    My apologies, too much Copy and paste!

    Append("Your estimated wait time is ", ToString(ToDuration(Call.EstimatedWaitTime)))


    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 9.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 09:47
    No replies, thread closed.

    I´m so sorry, but this does not play the duration in min and sec but saying something like: your estimated wait time is pt one m ten s



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 10.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 09:59
    No replies, thread closed.

    Don't apologize!

    At least it plays something ;-) can you confirm the correct voice is used?

    After that we just need to figure out the formatting.... @Robert Wakefield-Carl - any ideas?



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------



  • 11.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 10:08
    No replies, thread closed.

    Yes, the correct voice is used.



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 12.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 10:10
    No replies, thread closed.

    If you look at the documentation for the ToString function, that is what a duration value looks like.

    You can also convert the EWT to an integer value and play that, but then your caller have to do math in their head (divide by 60 for minutes, take remainder for seconds) to figure out what it means.  They're not going to be thrilled with that.

    So you need to do math on the value yourself to break it up into hours/minutes/seconds value and then play the individual pieces, inserting the "hours", "minutes", "seconds" words as necessary.



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 13.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 10:27
    Edited by Thomas Repking 03-02-2023 10:28
    No replies, thread closed.

    Oh, wow, yes, that looks like it could work. Thanks, Melissa, but building this expression is way too challenging for my skills. Would be great if I could get some more help/guidance from you. (So you need to do math on the value yourself to break it up into hours/minutes/seconds value and then play the individual pieces, inserting the "hours", "minutes", "seconds" words as necessary.)



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 14.  RE: Play a System Prompt with a voice other than Arabella
    Best Answer

    Posted 03-02-2023 11:40
    No replies, thread closed.

    I did it in a common module but sadly this forum won't let me attach the file.  So see the screenshot, full expressions will be listed below.  You can create your own common module if you want and pass the Call.EstimatedWaitTime value or just put the logic directly in your inqueue call flow.  Also decide what you want to play in the no paths.  I put in some dummy audio, but note that the actual Play EWT action will not play anything out loud in those cases.  Lastly this example is in English, but you can insert the appropriate words for hours/minutes/seconds in German.

    Task.durationAsSeconds is ToInt(ToInt(Common.duration)/1000)

    Task.hourValue is ToInt(Task.durationAsSeconds/3600)

    Task.leftOver is Task.durationAsSeconds - (3600*Task.hourValue)

    Task.minuteValue is ToInt(Task.leftOver/60)

    Task.secondValue is Task.leftOver % 60

    The play audio expression is 

    AudioPlaybackOptions(ToAudioTTS(Append(If(Task.hourValue > 0, Append(ToString(Task.hourValue), If(Task.hourValue==1, " hour ", " hours ")), ""), If(Task.minuteValue > 0, Append(ToString(Task.minuteValue ), If(Task.minuteValue==1, " minute "," minutes ")), ""), Append(Task.string, If(Task.secondValue > 0, Append(ToString(Task.secondValue ), If(Task.secondValue==1, " second ", " seconds")), "")))), true)



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 15.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-02-2023 12:43
    No replies, thread closed.

    Also there's a beta feature for using SSML in bot flows so you could tell it to pronounce the value as a duration, contact @Patrick Donnellan if you want to try it.



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 16.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-03-2023 05:40
      |   view attached
    No replies, thread closed.

    Thank you very much, Melissa. I've got it half figured out. I honestly never used shared modules until now, so I want to put it directly into my in-queue flow. The first thing I don't understand is: I think the IsSet(Common.duration) is a variable that holds the value of the Call.EstimatedWaitTime? If so, could you please show me how to create this variable? I get the update statements to work, but the second thing is: when I insert the expression into the audio, the expression editor doesn't show any error, but the audio action itself says 'AudioPlaybackOptions' at position 22: Must be the last operation performed in an expression (see attached screenshot).



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------



  • 17.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-03-2023 11:52
    No replies, thread closed.

    The Call.EstimatedWaitTime system variable exists in inqueue call flows, not common module flows.  Common.duration in an input to the common module so you can pass the value of Call.EstimatedWaitTime to it.  If you're not using a common module, then just directly use Call.EstimatedWaitTime.

    You need to switch the play audio action to custom expression mode, don't just add an expression item to the sequence builder.



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 18.  RE: Play a System Prompt with a voice other than Arabella

    Posted 03-06-2023 02:47
    No replies, thread closed.

    Thank you very much Melissa, it works now!



    ------------------------------
    Thomas Repking
    Canada Life Group Services Limited
    ------------------------------