mit-app-inventor

SecretWord

About this app

SecretWord is a speech-recognition app that mirrors the secret word of You Bet Your Life (1950–1960) with Groucho Marx. Secret Word to save the text box in the secret word. Stop to stop the speech recognizer. Image to start the speech recognizer. Then just speak!

Code

SecretWord blocks

There were a couple things to learn about continuous speech recogntion in non-legacy mode:

SecretWord also explores how to write scaled text on a Canvas — embodied in the display procedure.

display procedure blocks

Vincent De Oliveira (aka iamvdo) describes font-size, including how the font metrics define the em-square. The default font (sans-serif) has an em-square and FontSize that is 110% of the Canvas width divided by the length of the secret word. It is centered on the Canvas (with TextAlign centered) and surrounded by a rectangle one em-square tall and length-of-the-secret-word em-squares wide — clipped to the Canvas borders. The text is red within a black rectangle filled with white.

Designer

All components retain their default properties, — except Width and Height set to Fill parent... where necessary to center UX components.

Credits


🔗 permalink, 🔩 repository, and MIT AI2 logo .AIA for this page.