Just got this one figured out (with a lot of help) as of about a week ago. Were you waiting on me? This is not a simple process it will take some custom code.
First of all Nuance will create wav files for all utterances. On our nuance server the location looks like this:
c:\ProgramData\Nuance\Enterprise\Nuance\callLogs\MyApp\2018\09September\27\15 (where 27 is the day and 15 is the hour)
The files will have unique names like:
To match the utterance to a particular call/element you will need to examine the value returned in nbestInterpretation1 of the form of interest. It will return something like:
Parse out the fieldxxx (field979 in this case) and go look for that value in the -LOG file.
In that log file you will find a line with the wav file name along with a bunch of other stuff.
In that same line there is a field called DURS=1117 which I think denotes the duration of (1.117 seconds) play around with it.
A couple of things to note.
The -LOG file is written when the license is released.
The license is released when the call terminates.
A call transferred to an agent is not terminated.
To release the license as explained to me: "In your ICM script after the CVP application, have a label node going to “NOLABEL”, with the redirect box checked and the “failure” path off of that node continuing the rest of your call flow."
Notice that multiple utterances may be represented in a single log file.
You can process this at the end of the call in the On Call End class but you will need your process to sleep for about 10 seconds.
If you have multiple elements then will have to keep track of multiple fieldxxxs
If you figure out a way to release the license upon exiting an element or after each utterance let me know.