Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

TTS Server and testing a prompt for text

I've wrote some script that stores text to speech in a prompt and calls and plays that prompt.  Anyway of checking to see if the prompt actually contains something before I make the call?  Like using an If statement  prmtMessage > ?    I saw in Java were they were using prmtMessage.size > 1000 , but the I don't see this as being valid in the ccx editor.  Thanks, in advance for any help.

I thought the solution would work that was offered, but I would always get back 0.0 as the seconds from the tts prompt. Even though I could play it and hear 9 or 10 seconds.
Everyone's tags (2)

Accepted Solutions

You could try a "method"

You could try a "method" Gergely wrote up HERE.


You could try a "method"

You could try a "method" Gergely wrote up HERE.

Community Member

Unfortunately this works for

Unfortunately this works for wav files already on my system, but not for TTS generated prompts.  It always gives me back 0.0.  Never the error.  I need to be able to tell if a prompt generated by text to speech is empty.  I'd like to do this before I do the outbound calling.  Surely not everyone blindly trusts the TTS server to always hand back a sound file.  To me, if the TTS server goes down or just runs out of licenses or something I don't want to call and play my directions and then play a blank piece.  I tried the nanosecond thing also, thinking it would take longer to actually make a sound clip, but just got random amounts of time, depending on how busy IPCC was.

CreatePlease to create content