espeak.py 407 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. """
  3. pyttsx3
  4. """
  5. from __future__ import division
  6. from ..__load__ import *
  7. from .base import Base
  8. class Espeak(Base):
  9. def __init__(self):
  10. super(self.__class__, self).__init__()
  11. def setting(self, appid, **args):
  12. self.appid = appid
  13. def tts(self, phrase):
  14. filename = Demeter.md5(phrase)
  15. Popen.shell('espeak -v zh "'+phrase+'" --stdout > '+filename+'.mp3')