How can i make e clickable once “a” is completed

I see different Filipino phonetics from yours at

However, there are sound file links through that source.

What are you using as a source of Filipino phonetics?

I am using the ABAKADA book. so all in all it will only be,

15 times 5 = 75 plus 2 = 77 sounds
A,E,I,O,U
ba,be,bi,bo,bu
Ka, Ke, Ki, Ko, Ku
da,de,di,do,du
ga,ge,gi,go,gu
ha,he,hi,ho,hu
la,..
ma,..
na,..
ng*only one
mga..only one
pa,..
ra,..
sa,..
ta,..
wa,..
ya..

I apologize. I really don't know how to do it logically.

How will I make it without using a lot of vertical arrangements? I am doing everything again and removing the other vertical screens. I will send it once it is done.

Please don't bump your topic, @ABG will response when see this.

Record your 77(?) sound files following a strict naming pattern matching the 77(?) little unique pieces of text (phonemes?) that you offer to pronounce.

Make sure they fit in the Media folder. You might have to go back and find a good sound file format to save space but still work with the AI2 sound or player component.

Load them all into an Empty project and see if it will pass a Build.

Type up your complete phoneme list into a CSV text table, grouping them by leading consonant, using Notepad or a simple text editor. Upload it into your media folder under the name phonemes.csv

You started that earlier in this thread.

Learn these basic blocks...

I can continue after breakfast and chores.

People in other time zones may chip in.

1 Like

Further thoughts...

After you have your phoneme CSV file, make copies with subsets of it, named level1.csv, level2.csv, ... , matching your teaching curriculum.

Make a text file called curriculum.txt, listing the file names of your level files in increasing order of difficulty.

Use these files to drive your presentation and testing engine.

1 Like

Here is a simple sample of using text JOINs to generate a phoneme.
I used the Text To Speech component for the translation, because I don't have well named phoneme sound files:

image

phonics.aia (2.1 KB)

I built this in 15 minutes.

2 Likes

I will try to run file you attached here. I deleted Level 3, and deleted every vertical arrangement. I am only using one arrangement based on what you told me before, and hiding the buttons instead. I am trying to finalize Listening Exercise 1. Instead of Level 1,2,3, I will just make 2 Listening Exercise. I will post it here once I am done. Thank you for your help.

I would like to change the colors of buttons to red when they are clicked, and have them revert to blue once the sound has finished playing. How can I achieve this without repeating code?

For Listening Exercise 2, a sound should play when a specific button is clicked. I've included the .aia file for your reference. I have already deleted the previous project and started over, utilizing a few vertical arrangements. Thank you!
change color
FilPHLa_Final.aia (1.3 MB)

Try and post the blocks here...

You have dozens of sound components, but no sound files.

You only need one Player component, and you need at least one sound file per phoneme.

The Player component has an event that fires when it has finished playing the requested sound file.

The Sound component doesn't have such an event.

You can't avoid having sound files, so record a few to get started.
You wouldn't want to hear any sound files made by me.

1 Like

Here is a sample, using downloaded sound files:
image

blocks:

Designer:

player_buttons.aia (35.7 KB)

Sample run:
Sample run

1 Like

The changing of colors is working now. Thank you very much. I already put the sound files as well.

Now, I put a back button in Listening_Exercise1 (a screen)
I hid the back button when Listening_Exercise1 Initialize so it will appear in the next pace instead.

I want the back button to go the previous screen. For example "a" next is "ba" the image and sound component for "ba" will be shown, but once I click the back button, it will return to image "a" and " component "a". Since I have a lot of buttons, images and sound components, I am trying to use these blocks. Could you please help me figure it out?
image

FilPHLa_Final (1).aia (2.7 MB)

In this screen, I have 2 buttons and 2 vertical arrangements.
image

Vertical Arrangement 1. Home (User can choose which listening exercise they want to do first. - buttons)
Vertical Arrangement 2: ListeningExercise_1

image

when I am in Vertical Arrangement: ListeningExercise_1. If I click button "a" it will open another screen called "Listening_Exercise1" with a start value "aa.img, SoundA" ( i don't know if this is possible, this is the plan I came up, please help.), if I click button "ba" it will open the "Listening_Exercise1" screen again with a start value "baa.img, SoundBa".

image
when I click that it should open another screen (The main purpose of this Vertical Arrangement is if the user wants to jump with a particular phonetic sound they could skip the other sounds instead of starting from "a" over and over again.

Is this possible?

This is what I've tried so far.

Thank you very much.

image
I have 77 buttons, I made until Button54, I couldn't add anymore. I don't know why.

You still haven't learned the lesson of Don't Repeat Yourself (DRY).

I recommend you take this tutorial, to see how to reuse components from a list:

https://appinventor.mit.edu/explore/ai2/quizme

1 Like

Thank you. I will try again.

Here is a very small app that lets you play each phoneme.


phonics1.aia (2.6 MB)

Designer

Explanation, step by step:

We need only one global variable, the list of phoneme file names.
blocks

At app startup, we need to fill it.


The File component has a block to list all the file names in a directory.
Here, I ask for the Asset file scope, which covers all the mp3 files that were uploaded into this Project's Media folder (among others).

We use a List Picker to offer the selection of phonemes the user might want to hear.

This is the event that fills the Elements of a List Picker between the moment you Click the List Picker (it looks like a button before triggered) and before the List Picker lists out all its Elements for the user to choose from.

We read the data flow from right to left, coming from the global variable files that was populated earlier.

We first filter out the file names that contain ".mp3", because those are phoneme sound files.
Since we just want to name of the phoneme with out the .mp3 part at the end, we run the list through a list block that lets us map incoming values to improved values, in this case by replacing the ".mp3" part of the name with an empty string. Don't worry, the files list is still there, we are just working with a temporary copy to fill the Elements list of the List Picker.

By this point, the Elements list just has small phoneme names, little pieces of text from the mp3 file names. They are all unique, as good phoneme names should be.


This is the part of the List Picker where I must tell it what to do with the user's Selection.
A Selection is the Element the user poked.
In this case, it is the name of a phoneme, so we set the lpkPhoneme.Text value to that Selection.
This gives the user feedback that he didn't miss with his finger, and releaves the user of having to hold that phoneme name in his head for too long.
Once we have the phoneme name, it is time to prime our one and only Player component (Player1), with the name of the sound file it should play if and when we ask it to play its sound.

Now we tell the Player Player1 to Start its sound.

We have a Play button to let the user play the currently loaded Player1 sound file again.
We could have just loaded its .Text value up with the Selected phoneme name, with nice big bold font and color set in the Designer, but for some strange reason the developer thought button background image files were better. That mess is hidden in the value procedure image , further below.


This is the Play button, which doesn't actually have the .Text "Play", but has had its background image loaded with an image of the text of the current phoneme selection. (It's an indullgence.) When the Click event fires, we set the Source of thePlayer to the name of the mp3 file for the currently selected phoneme. The file name is built up from a Text JOIN of the phoneme and ".mp3", reversing what was done to get the clean list of phoneme Elements earlier in the List Picker.
Once the Player is ready with the proper file name, we tell it to Start.


This is the final missing piece, the value procedure that can take a phoneme ("ba") and turn it into a matching .png file name from the Media folder. For some strange reason, the original developer added an extra letter to the file name ("baa.png") matching the vowel letter. So since the vowel letter is at the end of the phoneme name, we use the length of the phoneme text in characters to tell us which letter the segment block should pull out of the phoneme. We then make a three level sandwich to build up the file name

  • phoneme
  • extra vowel letter
  • .png

and then that's what the value procedure returns.

1 Like

I don't understand. How did you make sure that the button, image, and sound is equal with each other? I ran the app that you provided, and they are all correct. I honestly don't understand the blocks you showed me. Sorry, I am quite slow when it comes to this, my brain is not good in understanding them fully. I tried to read the information in the link you gave me on how to do DRY. I still don't understand how will I apply it to my app.

Thank you for trying to help me, I appreciate you.