Re: EuTalker
- Posted by irv mullins <irvm at ellijay.com> Apr 23, 2004
- 587 views
Well, it appears that somewhere along the line, lines following a comment were removed. Let me try again. Hey, Rob, what happened to syntax coloring? include gtk2/wrapper.e atom win, panel, scroller, tv, buf, btn procedure Say(sequence text) system(sprintf("echo \"%s\" | festival --tts &",{text}),0) end procedure function Talk() Say(get(buf,"Text")) set(buf,"Text","") return NULL end function constant talk = call_back(routine_id("Talk")) win = window("Festival Speech Synth") set(win,"Size",{300,200}) set(win,"Border",10) panel = vbox(0,0) addto(win,panel) scroller = scrolled_window(0,0) addto(panel,scroller) tv = text_view() set(tv,"Wrap Mode",2) set(tv,"Left Margin",5) set(tv,"Right Margin",5) addto(scroller,tv) buf = get(tv,"Buffer") btn = button("gtk-ok") pack(panel,-btn,0,0,0) when(btn,"clicked",talk,0) show(win) main()