I'd rather do this directly in freeswitch as it supports custom tts engines by running commands.


Sent from the future

> On Mar 3, 2014, at 6:04 AM, Jeremy Thurgood <notifications@github.com> wrote:
> 
> In vumi/transports/voice/voice.py:
> 
> > +        if(self.input_type is None):
> > +            return self.vumi_transport.handle_input(self, ev.DTMF_Digit)
> > +        else:
> > +            if (ev.DTMF_Digit == self.input_type):
> > +                ret_value = self.current_input
> > +                self.current_input = ''
> > +                return self.vumi_transport.handle_input(self, ret_value)
> > +            else:
> > +                self.current_input = self.current_input + ev.DTMF_Digit
> > +
> > +    @inlineCallbacks
> > +    def create_and_stream_text_as_speech(self, engine, voice, message):
> > +        filename = ("%s/voice%d.wav" % (tempfile.gettempdir(), hash(message)))
> > +        log.msg("Looking for file %s" % filename)
> > +        if (not os.path.isfile(filename)):
> > +            os.system("%s -w %s \"%s\"" % (engine, filename, message))
> This is also a potential vector for executing arbitrary code. Using getProcessOutput would probably avoid that.
> 
> —
> Reply to this email directly or view it on GitHub.