Ejemplo n.º 1
0
 def _is_available(self):
     if check_executable(self.ioptions['festival']):
         cmd = ['festival', '--pipe']
         with tempfile.SpooledTemporaryFile() as in_f:
             self._logger.debug('Executing %s', ' '.join([pipes.quote(arg) for arg in cmd]))
             output = subprocess.check_output(cmd, stdin=in_f, stderr=subprocess.STDOUT, universal_newlines=True).strip()
             return 'No default voice found' not in output
     return False  # pragma: no cover
Ejemplo n.º 2
0
 def _is_available(self):
     if check_executable(self.ioptions['festival']):
         cmd = ['festival', '--pipe']
         with tempfile.SpooledTemporaryFile() as in_f:
             self._logger.debug('Executing %s',
                                ' '.join([pipes.quote(arg) for arg in cmd]))
             output = subprocess.check_output(
                 cmd,
                 stdin=in_f,
                 stderr=subprocess.STDOUT,
                 universal_newlines=True).strip()
             return 'No default voice found' not in output
     return False  # pragma: no cover
Ejemplo n.º 3
0
 def sound_available(self):
     return winsound or check_executable('aplay')
Ejemplo n.º 4
0
 def test_check_executable_not_found(self):
     self.assertFalse(
         check_executable('aieaoauu_not-findable_lfsdauybqwer'))
Ejemplo n.º 5
0
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
Ejemplo n.º 6
0
 def test_check_executable_not_found(self):
     self.assertFalse(check_executable('aieaoauu_not-findable_lfsdauybqwer'))
Ejemplo n.º 7
0
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
Ejemplo n.º 8
0
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
Ejemplo n.º 9
0
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
Ejemplo n.º 10
0
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])
Ejemplo n.º 11
0
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])