Random Image and Text to speech

Hi! I am trying to get my app to select a random image (which I know how to do), but then text to speech the name of the image when it pops up. Any ideas? Thanks

Welcome Jessica.

How you do this depends on how you select the random image and where the random image is stored.

If the file name of the image is all you want you can use the file name (after deleting the suffix file extension (png, jpg etc) and enter it in this Block


More difficult is if the file name does not represent the name of the image. In that case you may have to have a List of your images and a corresponding List of Names and use the two lists to identify the text you want to be the spoken message.

Thank you for your reply Steve. I have the two lists (one of file names, one of the spoken message), I am just not sure how to code it so that the names correspond to the pictures.

If the file name is treeimage.png and the image name is tree and the two Lists are congruent, then identify the note the List index number from the file list selected and set the message to select list item list name list with an index of the file list index.

Sorry for all of the questions as I a pretty new to this. How do I identify the list index number to be able to use it in the index section of the select list item list block

I figured it out! Thanks for your help!

randomimageandtexttospeech.aia (3.1 MB)

Is this how you wanted it?