Have a look at subtitles, these work in somewhat the same way but then with video.
You have a file starting at 1 with the timings when and until the text it must be shown.
434
00:48:31.165 --> 00:48:34.920
Some line of text goes here
Subtitle synchronization (as example of reading the format):
Subtitle Synchronization with C#[
^]
Good luck!