예제 #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
예제 #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
예제 #3
0
파일: base.py 프로젝트: JCGit2018/talkey
 def sound_available(self):
     return winsound or check_executable('aplay')
예제 #4
0
 def test_check_executable_not_found(self):
     self.assertFalse(
         check_executable('aieaoauu_not-findable_lfsdauybqwer'))
예제 #5
0
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
예제 #6
0
파일: test_suite.py 프로젝트: grigi/talkey
 def test_check_executable_not_found(self):
     self.assertFalse(check_executable('aieaoauu_not-findable_lfsdauybqwer'))
예제 #7
0
파일: test_suite.py 프로젝트: grigi/talkey
 def test_check_executable_found(self):
     self.assertTrue(check_executable('file'))
예제 #8
0
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
예제 #9
0
파일: flite.py 프로젝트: chakraroy/talkey
 def _is_available(self):
     return check_executable(self.ioptions['flite'])
예제 #10
0
파일: pico.py 프로젝트: chakraroy/talkey
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])
예제 #11
0
 def _is_available(self):
     return check_executable(self.ioptions['pico2wave'])