Exemplo 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))
Exemplo 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
Exemplo 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))
Exemplo 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
Exemplo 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