Exemple #1
0
    def is_available(cls):
        if (super(cls, cls).is_available() and
           diagnose.check_executable('text2wave') and
           diagnose.check_executable('festival')):

            logger = logging.getLogger(__name__)
            cmd = ['festival', '--pipe']
            with tempfile.SpooledTemporaryFile() as out_f:
                with tempfile.SpooledTemporaryFile() as in_f:
                    logger.debug('Executing %s', ' '.join([pipes.quote(arg)
                                                           for arg in cmd]))
                    subprocess.call(cmd, stdin=in_f, stdout=out_f,
                                    stderr=out_f)
                    out_f.seek(0)
                    output = out_f.read().strip()
                    if output:
                        logger.debug("Output was: '%s'", output)
                    return ('No default voice found' not in output)
        return False
Exemple #2
0
    def is_available(cls):
        if (super(cls, cls).is_available()
                and diagnose.check_executable('text2wave')
                and diagnose.check_executable('festival')):

            logger = logging.getLogger(__name__)
            cmd = ['festival', '--pipe']
            with tempfile.SpooledTemporaryFile() as out_f:
                with tempfile.SpooledTemporaryFile() as in_f:
                    logger.debug('Executing %s',
                                 ' '.join([pipes.quote(arg) for arg in cmd]))
                    subprocess.call(cmd,
                                    stdin=in_f,
                                    stdout=out_f,
                                    stderr=out_f)
                    out_f.seek(0)
                    output = out_f.read().strip()
                    if output:
                        logger.debug("Output was: '%s'", output)
                    return ('No default voice found' not in output)
        return False
Exemple #3
0
 def is_available(cls):
     return (super(cls, cls).is_available()
             and diagnose.check_executable('flite')
             and len(cls.get_voices()) > 0)
Exemple #4
0
 def is_available(cls):
     return (platform.system().lower() == 'darwin' and
             diagnose.check_executable('say') and
             diagnose.check_executable('afplay'))
Exemple #5
0
 def is_available(cls):
     return diagnose.check_executable('julius')
Exemple #6
0
 def is_available(cls):
     return (super(cls, cls).is_available() and
             diagnose.check_executable('flite') and
             len(cls.get_voices()) > 0)
Exemple #7
0
 def is_available(cls):
     return (super(cls, cls).is_available() and
             diagnose.check_executable('espeak'))
Exemple #8
0
 def is_available(cls):
     return (platform.system().lower() == 'darwin'
             and diagnose.check_executable('say')
             and diagnose.check_executable('afplay'))
Exemple #9
0
 def is_available(cls):
     return (super(cls, cls).is_available()
             and diagnose.check_executable('pico2wave'))
Exemple #10
0
 def is_available(cls):
     return (super(cls, cls).is_available() and
             diagnose.check_executable('pico2wave'))
Exemple #11
0
 def is_available(cls):
     return diagnose.check_executable('aplay')
Exemple #12
0
 def is_available(cls):
     return diagnose.check_executable('julius')