Beispiel #1
0
def GTTSautoread(toread, automatic=automaticQuestions):
    if not sound.hasSound(toread):
        if automatic == TTS_tags_only:
            playTTSFromText(toread)
        if automatic == TTS_if_no_tag_read_whole:
            if re.findall("\[GTTS:(.*?):(.*?)\]", toread, re.M | re.I):
                playTTSFromText(toread)
            else:
                TTS_read(toread, TTS_language)
Beispiel #2
0
def GTTSautoread(toread, automatic):
	if not sound.hasSound(toread):
		if automatic == TTS_tags_only:
			playTTSFromText(toread)
		if automatic == TTS_if_no_tag_read_whole:
			if re.findall("\[GTTS:(.*?):(.*?)\]", toread, re.M|re.I):
				playTTSFromText(toread)
			else:
				TTS_read(toread,TTS_language)
Beispiel #3
0
def ATTSautoread(toread, automatic):
    if not sound.hasSound(toread):
        if automatic:
            playTTSFromText(toread)
Beispiel #4
0
def ATTSautoread(toread, automatic):
    if not sound.hasSound(toread):
        if automatic:
            playTTSFromText(toread)
Beispiel #5
0
 def _maybeEnableSound(self):
     self.mw.form.actionRepeatAudio.setEnabled(
         hasSound(self.card.q() + self.card.a()))