I have a List of items selected by the user on one screen.
Then it plays a randomly picked item from the list on the main screen. ( which is working fine.)
Then repeat speaking a random item for a user specified amount of times.( which is working fine.)
The Function that Randomly picks item from the list works fine. ( which is working fine.)
The problem is it spurts off all the list items so fast that it only starts the speaking each item, and you only hear the final word completely.
I have tried "For Each", and Timers but not real success.
any other tips or suggestions would be appreciated.
--
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
--
App Inventor is an event driven programming tool. What this means is that it does things in sequence (more or less). Your code is probably telling the SpeechtoText to fire on each list item...and guess what? The Android can not keep up and you get collisions.
Why not instead, create a string from the list items of the various lists, and only then let the app do a TextToSpeech on that string?
--
CREATE A STRING. Completely do able, i knew it was just something i wasn't seeing. i'll give it a try. and see if i have any improvements .
thanks for now.
as for code blocks, ive rearrange, deleted, and transformed this couple of functions numerous times trying combinations of things so its a mess right now.
I'll keep it in mind though.
--
I avoided run-on speech by arranging my speech texts in a queue
(list) serviced by the speech block that triggers when it finishes speaking
the current word.
It was an attempt to have it "sing" a Gilbert and Sullivan patter song.
.
See the attached .aia file.
--
댓글 없음:
댓글 쓰기