Render the text       This is an example of speech synthesis      as speech.



Related task

   using a speech engine to highlight words




--
-- demo\rosetta\Speak.exw
-- ======================
--
with javascript_semantics
requires(6) -- WINDOWS or JS, not LINUX
requires(32) -- Windows 32 bit only, for now... 
-- (^ runs fine on a 64-bit OS, but needs a 32-bit p.exe)
requires("1.0.2")
include builtins\speak.e -- (new in 1.0.2)
constant text = "This is an example of speech synthesis"

include pGUI.e

function button_cb(Ihandle /*ih*/)
    speak(text)
    return IUP_CONTINUE
end function

IupOpen()
Ihandle btn = IupButton("Speak",Icallback("button_cb")),
        dlg = IupDialog(IupHbox({btn},"MARGIN=180x80"))
IupSetAttribute(dlg,"TITLE",text)
IupShow(dlg)
if platform()!=JS then
    IupMainLoop()
    IupClose()
end if
