Using a speech engine to highlight words: Difference between revisions

Content added Content deleted
Line 76: Line 76:
{{trans|Go}}
{{trans|Go}}
<lang julia>function speak(sentence, cmd = "/utl/espeak.bat")
<lang julia>function speak(sentence, cmd = "/utl/espeak.bat")
prev = ""
prevlength = 0
bs = ""
for word in split(sentence)
for word in split(sentence)
s = replace(lowercase(word), r"[^a-z]" => "")
s = replace(lowercase(word), r"[^a-z]" => "")
Line 90: Line 87:


speak("Are those shy Eurasian footwear, cowboy chaps, or jolly earthmoving headgear?")
speak("Are those shy Eurasian footwear, cowboy chaps, or jolly earthmoving headgear?")

</lang>
</lang>