Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

TTS Issue

Discussion in 'CRM / Helpdesk / App Integration' started by mv.ape, Jul 12, 2016.

Thread Status:
Not open for further replies.
  1. mv.ape

    Joined:
    Feb 16, 2015
    Messages:
    24
    Likes Received:
    3
    Hello,

    I make a VAD that will check a credit in a database and then tell to customer using text to speech.

    I use a QueryResult and get the right value from database.

    In the text to speech I don't know why a the end it say "undefined": "Your credit is 5"... undefined.

    In debug mode I've check the value is good.
    TTS concatenate: 'Your credit' + $callflow.Credit

    Even if i try to replace $callflow.Credit by a fixed number
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    The problem is that $callflow.Credit is not a valid javascript expression. You need to use the CONCATENATE function instead. Please try with the following expression:
    CONCATENATE('Your credit', callflow$.Credit)

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mv.ape

    Joined:
    Feb 16, 2015
    Messages:
    24
    Likes Received:
    3
    I already use CONCATENATE function.
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    Can you show exactly the expression used in your TTS prompt?

    You mentioned:
    'Your credit' + $callflow.Credit

    which is not valid.

    You should use:
    CONCATENATE('Your credit is ', callflow$.Credit)

    and it should work as long as callflow$.Credit has the right value.

    How are you setting callflow$.Credit?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mv.ape

    Joined:
    Feb 16, 2015
    Messages:
    24
    Likes Received:
    3
    TTS Exp:
    CONCATENATE('Vous disposez de ticket de support, votre solde de ticket est de',callflow$.CreditTicket)

    In my test call:
    VARIABLE_CHANGED: AccueilSTechique_CreditTicket=5

    AccueilSTechique is the name of the callflow
    CreditTicket is declared in the callflow (R/W) with an initail value of 0.

    All work except the word "undefined" in the speech at the end
     
  6. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    Thanks for sending the detailed explanation.

    I think that the problem might be the comma in the middle of your text. Can you please try with the following expression?
    CONCATENATE('Vous disposez de ticket de support votre solde de ticket est de',callflow$.CreditTicket)

    (removed the comma between "support" and "votre").

    Just to see if this makes any change.

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mv.ape

    Joined:
    Feb 16, 2015
    Messages:
    24
    Likes Received:
    3
    Hello,

    Many thanks that work when delete coma in TTS.
    So one question how to make "pause" instead of a comma?
     
  8. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    That is a bug and needs to be fixed, but for now you need to use a different way.

    Have you tried with a period?
    CONCATENATE('Vous disposez de ticket de support. Votre solde de ticket est de',callflow$.CreditTicket)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.