Exemple #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
Exemple #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
Exemple #3
0
 def sound_available(self):
     return winsound or check_executable('aplay')
Exemple #4
0
 def test_check_executable_not_found(self):
     self.assertFalse(
         check_executable('aieaoauu_not-findable_lfsdauybqwer'))
Exemple #5
0
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
Exemple #6
0
 def test_check_executable_not_found(self):
     self.assertFalse(check_executable('aieaoauu_not-findable_lfsdauybqwer'))
Exemple #7
0
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
Exemple #8
0
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
Exemple #9
0
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
Exemple #10
0
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])
Exemple #11
0
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])