-- card: 2974 from stack: in -- bmap block id: 10135 -- flags: 4000 -- background id: 2599 -- name: ----- HyperTalk script ----- on say if MacintalkInstalled() then pass say end say on openCard push recent card pop card into test if not (("help" is in test) or ("Macintalk Phoneme Table" is in test) or ("Home Stack" is in test)) then push test end openCard on EnterKey send mouseUp to button "Say Phonetic" end EnterKey -- part 5 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=8 top=176 right=206 bottom=94 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Say Phonetic ----- HyperTalk script ----- on mouseUp global theSpeech if theSpeech is empty then TurnSpeechOn -- Remove one source of common error by converting any -- lower case letters in the string to upper case if the selection is empty or the Selection is in field "English" then put lowerToUpper(field "Phonetic") into field "Phonetic" SayPhonetic field "Phonetic" else put lowerToUpper(selection) into theString SayPhonetic theString end if put the Result into theError if first word of theError is "Error" then play "Boing" if the selection is empty or the Selection is in field "English" then put field "Phonetic" into theString put last word of theError into errorOffset put "Error in phonetic string at indicated character" into card field "Error" put "«" & char errorOffset of theString & "»" into char errorOffset of theString put theString into line 3 of card field "Error" repeat for errorOffset put " " after x end repeat put "^" after x put x into line 4 of card field "Error" beep 2 show card field "Error" end if end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=7 top=74 right=104 bottom=83 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Say English ----- HyperTalk script ----- on mouseUp global theSpeech if theSpeech is empty then TurnSpeechOn if the Selection is empty or the Selection is in field "Phonetic" then Say field "English" else Say the Selection end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=465 top=21 right=56 bottom=503 -- title width / last selected line: 0 -- icon id / first selected line: 20098 / 20098 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp pop card into trash go home end mouseUp -- part 6 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=191 top=55 right=77 bottom=291 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Translate ----- HyperTalk script ----- on mouseUp global theSpeech if theSpeech is empty then TurnSpeechOn if not (the result is empty) then exit mouseUp if the Selection is empty or the Selection is in field "Phonetic" then put Phonemes(field "English") into field "Phonetic" else put Phonemes(the Selection) into field "Phonetic" end if SayPhonetic field "Phonetic" end mouseUp -- part 18 (field) -- low flags: 01 -- high flags: 0004 -- rect: left=304 top=307 right=333 bottom=422 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 18 -- style flags: 8448 -- line height: 24 -- part name: -- part 11 (button) -- low flags: 00 -- high flags: 8003 -- rect: left=13 top=27 right=49 bottom=71 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Index ----- HyperTalk script ----- on mouseUp pop card into trash visual effect iris close go to card id 8965 end mouseUp -- part 17 (field) -- low flags: 01 -- high flags: 0004 -- rect: left=99 top=307 right=334 bottom=184 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 18 -- style flags: 8448 -- line height: 24 -- part name: -- part 10 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=280 top=304 right=336 bottom=423 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Consonants ----- HyperTalk script ----- on mouseUp visual effect iris open go to card id 4525 end mouseUp -- part 13 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=413 top=21 right=56 bottom=452 -- title width / last selected line: 0 -- icon id / first selected line: 2162 / 2162 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return ----- HyperTalk script ----- on mouseUp visual effect iris close pop card end mouseUp -- part 14 (button) -- low flags: 80 -- high flags: 8004 -- rect: left=321 top=67 right=93 bottom=403 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Stop, Dave ----- HyperTalk script ----- function round frac return trunc(frac + 0.5) end round on sing -- pitch,text setpitch param(1) sayphonetic param(2) end sing on mouseUp -- Set up the notes we need to sing the first two measures -- of “Daisy” (or is it “A Bicycle Built for Two”?) -- In honor of Stanley Kubrick put 2^(1/12) into semitone put semitone*semitone into wholetone put 80 into g1 put wholetone*g1 into x put round of x into a1 put wholetone*x into x put round of x into b1 put semitone*x into x put round of x into c2 put wholetone*x into x put round of x into d2 put wholetone*x into x put round of x into e2 -- we don’t need f put round of (x*wholetone*semitone) into g2 setpitch 150 setrate 150 say "stop, dave. Stop." setpitch 110 setrate 120 say "I can feel my mind going. I can feel it." setpitch 90 setrate 105 say "Stop dave. Stop." setpitch 75 setrate 90 say "I can feel it going. Stop, dave." -- Hit it, HAL! setrate 110 setpitch 0,"robotic" sing g2,"DEYEYEYEY4 #" sing e2,"ZIYIYIYIY #" sing d2,"DEYEYEYEY4 #" sing c2,"ZIYIYIYIY #" sing a1,"GIH5V #" sing b1,"MIY #" sing c2,"YOHR #" sing a1,"AE4N #" sing c2,"SER #" sing g1,"TRUW1 #" -- reset the state of Macintalk before we leave TurnSpeechOff TurnSpeechOn play "Boing" end mouseUp -- part 19 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=74 top=304 right=336 bottom=184 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Consonants ----- HyperTalk script ----- on mouseUp visual effect iris open go to card id 14779 end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=362 top=21 right=56 bottom=401 -- title width / last selected line: 0 -- icon id / first selected line: 2478 / 2478 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Info ----- HyperTalk script ----- on mouseUp show card field "Info Title" show card field "Info" end mouseUp -- part 21 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=5 top=24 right=336 bottom=500 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Info ----- HyperTalk script ----- on mouseUp hide card field "Info" hide card field "Info Title" end mouseUp -- part 22 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=49 top=27 right=53 bottom=440 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Info Title ----- HyperTalk script ----- on mouseUp send mouseUp to card field "Info" end mouseUp -- part 23 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=10 top=99 right=205 bottom=496 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Error ----- HyperTalk script ----- on mouseUp hide the Target end mouseUp -- part contents for background part 2 ----- text ----- JIY5N LAHK PIH1KAA1RD # -- part contents for background part 1 ----- text ----- Jean Luc Picard -- part contents for background part 4 ----- text ----- English -- part contents for background part 5 ----- text ----- Phonetic -- part contents for card part 18 ----- text ----- Consonants -- part contents for card part 17 ----- text ----- Vowels -- part contents for card part 21 ----- text ----- Speech lab allows you to hear both english text and phonetic text. There are two windows, the English window (top) and the Phonetic window (bottom). Directly above each window are buttons labelled "English” and “Phonetic”. Clicking these buttons causes the contents of the corresponding window to be spoken. If there text selected in the window, only the selected text will be spoken. Also, pressing the enter key is equivalent to pressing the “Phonetic” button. If there is an error in the phonetic text, it will not be spoken (Macintalk always manages to pronounce whatever you put in the English window). An window will come up highlighting the error with the marks «». When you click on the button labelled “Translate”, any text in the English window will be translated into phonemes and displayed in the phonetic window. The text will also be spoken. You can then make modifications in the phonetic text and hear the results of your changes by clicking the “Phonetic” button. You can compare the pronunciation to that of the original string at any time be pressing the “English” button. The two buttons at the bottom get you to the Macintalk Phoneme Table. Use them often! -- part contents for card part 22 ----- text ----- Speech Lab Instructions -- part contents for card part 23 ----- text ----- Error in phonetic string at indicated character TUX EH1KSPLOHR NUW1 WOHR«2»LDS ^