Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  User Prompt data type textToSpeech Property

    Posted 07-26-2021 10:35
    No replies, thread closed.
    There is an article (see below) In the Genesys Cloud help portal which shows that the 'textToSpeech' property is "available in a prompt data type". But, I cannot find a way to retrieve this value real-time in an Architect flow.

    For example, I would like to provide the name of an existing User Prompt in the Find User Prompt action and have it return the value in the textToSpeech Property of that prompt. I've tried multiple different ways in the expression editor, but I can't find a way to make it work. Has anyone done this before and/or have a suggestion of how I might achieve this? I also did a cursory look through the Genesys Cloud data action documentation to see if there was a method to do it there, but I did not find anything obvious. 

    I appreciate the help! 

    Prompt data type - Genesys Cloud Resource Center
    Genesys Cloud Resource Center remove preview
    Prompt data type - Genesys Cloud Resource Center
    The prompt data type can be a useful tool in helping flow... [More]
    View this on Genesys Cloud Resource Center >


    #ArchitectureandDesign

    ------------------------------
    Patrick Rohlf
    Summit Broadband
    ------------------------------


  • 2.  RE: User Prompt data type textToSpeech Property

    Posted 07-27-2021 03:37
    No replies, thread closed.
    Hi Patrick,
    I am not sure what your use-case is to know the value of the prompt, but to get this working, think you would need to use the API's and get the information you require and use it to play in TTS.
    There are a few prompt specific API's but I guess "/api/v2/architect/prompts" would help.

    Regards

    ------------------------------
    Vineet Kakroo
    FIL Investment Management Ltd
    ------------------------------



  • 3.  RE: User Prompt data type textToSpeech Property

    Posted 07-27-2021 16:13
    No replies, thread closed.
    Hi Patrick

    I took a very quick look at this yesterday and in my short testing I could only get back the id, name and type - not the textToSpeech property.  Not sure then if the documentation is wrong, I'm looking at it wrong, or it's a defect.

    Out of curiosity what are you looking to do with this data when you retrieve it?

    ------------------------------
    Vaun McCarthy
    NTT New Zealand Limited
    ------------------------------



  • 4.  RE: User Prompt data type textToSpeech Property

    Posted 07-27-2021 17:54
    No replies, thread closed.
    Hey Guys,

    Thanks for taking a look at this for me. My goal is that I would like to pull back the text value in the TTS property so that I can use it in a string variable in a message to customers. My use case has to do with customers reaching out to our company to get details on declared service interruptions. Currently I use the audio files associated with the prompts and play them back in Inbound Call Flows. I would like to use the TTS values of those same prompts to send text responses in Inbound Message flows, for example. 

    Thanks!

    ------------------------------
    Patrick Rohlf
    Summit Broadband
    ------------------------------



  • 5.  RE: User Prompt data type textToSpeech Property

    Posted 07-27-2021 18:03
    No replies, thread closed.
    Use the GetPromptTextToSpeech function


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



  • 6.  RE: User Prompt data type textToSpeech Property

    Posted 07-28-2021 09:17
    No replies, thread closed.
    Thanks, Melissa! I never noticed that function before. That should serve my purposes exactly.

    ------------------------------
    Patrick Rohlf
    Summit Broadband
    ------------------------------



  • 7.  RE: User Prompt data type textToSpeech Property

    Posted 07-27-2021 18:30
    No replies, thread closed.
    Documentation will get fixed. 

    As to the api: technically a prompt does not have tts.  A prompt is a container for a bunch of language resources.  So if you can have a greeting prompt, with a resource in en-us that says "hello", a 2nd resource in fr-ca that says "bonjour", etc.  So when you look up the /api/v2/architect/prompts endpoint you will see something like this

    {
    	"entities": [{
    			"id": "myPromptId",
    			"name": "greeting",
    			"description": "how to say hi",
    			"resources": [{
    					"id": "en-us",
    					"promptId": "myPromptId",
    					"language": "en-us",
    					"mediaUri": "<someUriHere>",
    					"ttsString": "hello",
    					"text": "hi",
    					"uploadStatus": "transcoded",
    					"uploadUri": "<anotherUriHere>",
    					"languageDefault": true,
    					"durationSeconds": 1.053,
    					"selfUri": "/api/v2/architect/prompts/myPromptId/resources/en-us"
    				},
    				{
    					"id": "fr-ca",
    					"promptId": "myPromptId",
    					"language": "fr-ca",
    					"ttsString": "bonjour",
    					"text": "bonjour",
    					"uploadStatus": "created",
    					"uploadUri": "<anotherDifferentUriHere>",
    					"languageDefault": true,
    					"selfUri": "/api/v2/architect/prompts/myPromptId/resources/fr-ca"
    				}
    			],
    			"selfUri": "/api/v2/architect/prompts/myPromptId"
    		},
    		{
    			"id": "myPromptId2",
    			"name": "goodbye",
    			"description": "how we say bye",
    			"resources": [{
    					"id": "en-us",
    					"promptId": "myPromptId2",
    					"language": "en-us",
    					"ttsString": "goodbye",
    					"text": "bye-bye",
    					"uploadStatus": "created",
    					"uploadUri": "<yetAnotherUriHere>",
    					"languageDefault": true,
    					"selfUri": "/api/v2/architect/prompts/myPromptId2/resources/en-us"
    				},
    				{
    					"id": "fr-ca",
    					"promptId": "myPromptId2",
    					"language": "fr-ca",
    					"ttsString": "Au revoir",
    					"text": "Au revoir",
    					"uploadStatus": "created",
    					"uploadUri": "<oneMoreUri>",
    					"languageDefault": true,
    					"selfUri": "/api/v2/architect/prompts/myPromptId2/resources/fr-ca"
    				}
    			],
    			"selfUri": "/api/v2/architect/prompts/myPromptId2"
    		}
    	],
    	"pageSize": 25,
    	"pageNumber": 1,
    	"total": 2,
    	"firstUri": "/api/v2/architect/prompts?pageSize=25&pageNumber=1&sortBy=name",
    	"selfUri": "/api/v2/architect/prompts?pageSize=25&pageNumber=1&sortBy=name",
    	"lastUri": "/api/v2/architect/prompts?pageSize=25&pageNumber=1&sortBy=name",
    	"pageCount": 1
    }


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



  • 8.  RE: User Prompt data type textToSpeech Property

    Posted 07-28-2021 00:10
    No replies, thread closed.
    Thanks Melissa

    ------------------------------
    Vaun McCarthy
    NTT New Zealand Limited
    ------------------------------



  • 9.  RE: User Prompt data type textToSpeech Property

    Posted 07-28-2021 09:20
    No replies, thread closed.
    Thanks, Melissa.

    ------------------------------
    Patrick Rohlf
    Summit Broadband
    ------------------------------