def handle_result()

in tts/tts/scripts/voicer.py [0:0]


    def handle_result(self, synthesizer_response):
        result = synthesizer_response.result
        try:
            r = json.loads(result)
        except Exception as e:
            s = 'Expecting JSON from synthesizer but got {}'.format(result)
            self.logger.error('{}. Exception: {}'.format(s, e))
            return

        result = ''

        if 'Audio File' in r:
            audio_file = r['Audio File']
            self.logger.info('Will play {}'.format(audio_file))
            self.play(audio_file)
            result = audio_file

        if 'Exception' in r:
            result = '[ERROR] {}'.format(r)
            self.logger.error(result)

        return result