My new solution to exercising more control over the playback of audio to the different kiosk channels is to pass playback of the cereproc rendered file over to PD and then route it through app_jack to the handset rather than rendering it directly through Asterisk playback – the first few lines of code are:
; answer 3 digit calls starting with one
exten => _1XX,1,Answer()
;cereproc application tts_callback refrences audio.voice and license.lic to read exten.xml and output tts_callback.wav
exten => _1XX,n,System(python /home/chris/Dropbox/K6_primo/cerevoice_sdk/examples/python/tts_callback18.py -L /home/chris/Dropbox/K6_primo/cerevoice_sdk/examples/basictts/license.lic -V /home/chris/Dropbox/K6_primo/cerevoice_sdk/audio.voice /home/chris/Dropbox/K6_primo/K6/${EXTEN}.xml)
;Enable Jack
exten => _1XX,n,JACK()
once the jack channel is available then pd can play the wav file created by cereproc and placed in the / root directory – it may be better to modify tts_callback to locate the file somewhere else