A book with ListViewer (or Label Display of csv )

I hope it can be edited to this type :

Thank you Tim

OK, just to confirm, the two timinscsv files you supplied look like this:

timingscsv1.csv
1,110401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,110402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39
timingscsv2.csv
1,210401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,210402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39

but they should look like this:

timingscsv1.csv
1,110401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,210401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39
timingscsv2.csv
1,110402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,210402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39

Yes ?

( I also note that 2.csv only has 6 lines, but you have indicated 7 in the above files, I will assume this is just an example [it generates an error trying to play/read the 7th line which is not there])

Yes ?
No.it is not.
The one I supplied look like this is the correct one.
The first digit indicates the reader number or timingscsv files and the last two digits are for the text:

timingscsv1.csv
1,110401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,110402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39
timingscsv2.csv
1,210401.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,11,15,20,26,32,46
2,210402.mp3,1JrIYq7WGMeaVbXN5VzBo5ZprpynZxUsd,5,10,14,18,25,31,39

These are the correct ones. Now I have corrected them.
timingscsv1.csv (130 Bytes) timingscsv2.csv (130 Bytes)

If I understand correctly, the items in timingscsv1 are for reader 1 and in timingscsv2 are for reader 2 ?

Yes, you are absolutely right.

OK, a quick switch of selections fixed that. Try now

readerV1Demo3.aia (3.4 MB)

Thank you very very much Tim. Very well done!
It works fine so far. I will let you know how is it going on.

Hello Tim,
I have completed saving all files in external app and retrieve them very well. Could you please edit reading csv files because I have confuse with timing corresponding with highlight the texts.
I have put the correct csvs for each reader.
timingscsv1.csv (138 Bytes)
timingscsv2.csv (137 Bytes)

Here is a print screen for Audicity with labels for highlight each sentence for timingscsv2.csv Text 2
As you can see there is no label in the begining of the first sentence but starts after that.


readerV1Demo3.aia (3.6 MB)
Thank you so much Tim.

The blocks I previously provided handled this (with a procedure). In order to get the text position and the playback timings to match up, a 0 is added to the timings in order to start the playback from the beginning. This was working with your supplied example files, and assumes that the title is not read out in the sound file (which appeared to be the case with your example files).

For example, the timings file contains
5,10,20,25,30
This is converted to:
0,5,10,20,25,30
and then
[[0,5000],[5000,10000],[10000,20000],[20000,25000],[25000,30000]] to provide the playback selections for the sound file.
Another procedure will calculate the length of characters to be highlighted, for each time period, but this starts after the title.

If your subsequent sound files do not follow the same pattern then this will not work for you

Hello Tim,
I think I need to edit the arrangeTimings block into like this

After I have tested with this editing. It works perfectly with the short texts that has around 20 lines only but when I tested with the long text that has 100 lines and when I select any text it reads that text perfectly but after read that text it read in delay I mean it reads but it reads approximately.

Hello Tim,
I have tested the aia with a csv file that includes 228 lines and 25 minutes of mp3. I have noticed that the sound is not matches the highlighted texts. could you please check it. I have added the sound 210401 in the aia
timingscsv2.csv (1.1 KB)


readerV1Demo3.aia (6.9 MB)

Have a look at the values in global timings after the arrangeTimings procedure has filled it. Do these pairs of values seem to be correct?

It is possible that the highlighted text starts to drift a bit because the line numbers grow (1,10,100,...)

1 Like

Hello Tim,
Yes. the pairs of values in global timings after arrangeTimings procedure has filled correct.
Would you please check it if you can. I'm afraid that the problem is from the clock procedure.

Have you modified the clock procedure from my example ? Which clock procedure are you referring to ?

No, I have not modified the clock procedure from your example. I mean the clock procedure in your example.

Hello Tim,
I have tested the aia with a different csv file that includes 227 lines and 23 minutes of mp3. It is the same problem. The sound is not matches the highlighted texts.
I just put 1.csv file 110401.mp3 for Reader 1
timingscsv1.csv (1.1 KB)
readerV1Demo3.aia (4.5 MB)

Hello Tim,
Please have a look to my block from my previous project. It might be help you to solve this problem.

I am sorry, I do not have an answer for this. Everything appears to be working as it should be in terms of identifying the locations on the sound file for a particular line (based upon your timings), and that the positioning for the highlighting is also working, based upon the line breaks provided in your files. I am unable to see/hear whether it working OK or not, because I do not speak or read Arabic.

If I get some time, and have the motivation, I can probably do some debugging....

That is really a very good newes. Thank you very much Tim.

The 1.csv file you provided appears to be corrupt in some way:

I am getting extra items on every line with the number 37 and 38. This would prevent the highlighting from working correctly....

????