Esempio n. 1
0
 def pronounce (self, sentence):
     try:
         self.init()
         if self.festival_process is not None:
             self.festival_process.stdin.write('(SayText "%s")\n' % helper.unaccent(sentence))
     except OSError, e:
         self.controller.log(u"TTS Error: " + unicode(e.message))
Esempio n. 2
0
 def pronounce (self, sentence):
     try:
         self.init()
         if self.festival_process is not None:
             self.festival_process.stdin.write('(SayText "%s")\n' % helper.unaccent(sentence))
     except OSError as e:
         logger.error("TTS Error: " + str(e.message))
     return True
Esempio n. 3
0
 def pronounce(self, sentence):
     try:
         self.init()
         if self.festival_process is not None:
             self.festival_process.stdin.write('(SayText "%s")\n' %
                                               helper.unaccent(sentence))
     except OSError, e:
         self.controller.log(u"TTS Error: " + unicode(e.message))
Esempio n. 4
0
 def brldisplay(self, message, reset_index=True):
     if self.brlconnection is None:
         self.init_brlapi()
     if reset_index:
         self.char_index = 0
     msg = helper.unaccent(message)[self.char_index:]
     if self.brlconnection is not None:
         self.brlconnection.writeText(msg)
     else:
         self.controller.log(_("Braille display: ") + msg)
     return True
Esempio n. 5
0
 def brldisplay(self, message, reset_index=True):
     if self.brlconnection is None:
         self.init_brlapi()
     if reset_index:
         self.char_index = 0
     msg = helper.unaccent(message)[self.char_index:]
     if self.brlconnection is not None:
         self.brlconnection.writeText(msg)
     else:
         self.controller.log(_("Braille display: ") + msg)
     return True