示例#1
0
 def test_speechLoremIpsum(self):
   """ Play some reference speeches. """
   speeches = ("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
               "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte.")
   for lang, speech in zip(("en", "fr"), speeches):
     for effect in (None, ("speed", "10")):
       google_speech.main(speech, lang, effect)
示例#2
0
 def test_speechLoremIpsum(self):
     """ Play some reference speeches. """
     speeches = (
         "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
         "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte."
     )
     for lang, speech in zip(("en", "fr"), speeches):
         for effect in (None, ("speed", "10")):
             google_speech.main(speech, lang, effect)
示例#3
0
def say(string):
    gs.main(string, lang='ru', sox_effects='')
示例#4
0
 def speak(self, text, language=None, remember=True):
     speak_language = language if language else self.speak_language
     google_speech.main(text, speak_language, None)
     if remember and text:
         self.database.insert_into(table_name=self.SPEAK_LOG_TABLE,
                                   values={'sentence': text})
def hablar(texto):
    google_speech.main(texto, "es", None)