[asterisk-dev] app_background and app_cepstral

Steven Critchfield critch at basesys.com
Thu Jan 26 11:22:04 MST 2006


On Thu, 2006-01-26 at 12:40 -0500, Jason Wolfe wrote:
> currently, when using swift TTS engine with app_cepstral, generated audio is
> streamed to the channel.  This means that a call to ceptsral operates like
> app_playback.  I need the functionality of app_background.  I'm thinking I
> have two options... 1.) use system() to call swift engine, create a
> temporary file, background() the temp file, and then delete the temp file.
> option 2.) write this functionality into app_cepstral and use a flag in the
> call.
> 
> Has anyone already solved this problem, or does anyone have another
> suggestion?

Disclaimer, I don't use cepstral or care greatly about it.

Seems like that is a lot of special casing to get the job done. Couldn't
you look at how the audio is being streamed to the channel and see if
you could change it to look for the audio. I bet cepstral is sending the
audio as quickly as the pipe allows it to. So once you detect the need
to stop audio, you could close the pipe, or suck the audio in
and /dev/null it. 

Either way, this would be a much smaller change than changing the way
audio was gathered and played based on interuptability. 
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-dev mailing list