Random text generator with speech

Hello everyone,

I'm new to processing and I would like advice on how to create a program I need for a project.

What I need: A program that randomly chooses one word from a list of fixed words, let's say every 5 seconds, and displays that word in the center of the screen. I would like the screen to be size(480, 720) and background (0). One more thing: each time a word is displayed on the screen, there should be a computer voice pronouncing the word aswell.

My abilities with processing are VERY BASIC, so an example script with some explanation (which piece of code does what) would be very much appreciated!

Also, not sure whether this is very relevant but the list should contain more than 200 words.

Answers

  • Last thing: the program should never stop. It should be a loop (not sure if that's clear but what I mean is that I don't want a program that just reads all the words in a random order and then stops. I want it to continuously read random words from the list without ending)

  • Also: the word on the screen should dissapear when the next one appears

  • edited December 2017

    @ulyss===

    that is easy with command line; yet i am not here for "giving code": put what you have tried.

  • i don't even know what a command line is to be honest. i'll look it up

  • Answer ✓

    Start with implementing setup and draw

    Before setup ()have

    String [] words = { „hello“, „you“, „there“ };

    my phone destroys „“ - use normal „“ of course

    Then in setup use

    int len1 = words.length;

    currentWord = words[int (random (len1))];

    println(currentWord);

    or use text() in draw()

    See reference for all this

  • That is some nice advice, thanks. I'll look into it and post an update with my first prototype soon.

    Thanks guys!

  • Search for timer or millis in the forum

    To know how to make a timer to move on to the next word

Sign In or Register to comment.