Scratch 3 the gift that keeps on giving; including the new extensions are Text to Speech and Translate; Text to speech - does as the name suggests, turns typed in phrases into speech via Amazon Web Services. Translate using Google (and I assume Google Translate?) to translate text between different languages. As an experiment, I wanted to play with clapping my hands, have Scratch the Cat ask me to enter a phrase and then convert that into French, German and Spanish with different voices. The resulting code is shown below. It is all started by a loud noise like a hand clap. The two extensions have been added to the blocks and are ready to go. The voice is initially set to Alto and the text-speech block has had the phrase "Please enter a phrase" typed in and says this. The ask block has the same question permanently set and the answer produced gets feed into the translations. The remaining blocks do essentially the same thing - change the voice; - take the phrase ty...
Comments
Post a Comment