def say_URL(url): # Set up SpeechTokenizer to handle HTML tags st = token.SpeechTokenizer() st.add_rules(rules.html_rules) text = urllib.urlopen(url).read() text = token.untokenize(st.tokenize(text)) tts.say_text(text) return text
def process(s): return token.untokenize(token.SpeechTokenizer().tokenize(s))