I was finally able to have some time to do this.
It turns out that it is quite easy to use the Python srt package.
Since you may or may not have a Python environment ready to use, I suggest an online tool like Google Colab.
I think you can reproduce this easily. Just replace the text betwen triple quotes with your own text (keeping the triple quotes), and at the end, copy the output and save it to a file using the .srt extension.
Below is the code.
Put this in one cell to "install" the srt package into your Colab notebook:
!pip install srt
Then in another cell you can put the code to generate the srt syntax from your lines of text:
text = """
Le commandant
José Veríssimo
et son équipage
vous souhaite
les bienvenus
à bord de notre Boeing
"""
import srt
import datetime
subtitles = []
for index,line in enumerate(text.split('\n'),1):
start_time = datetime.timedelta(seconds=5*index+1)
end_time = datetime.timedelta(seconds=5*index+5)
subtitles.append(srt.Subtitle(index,start=start_time,
end=end_time,
content=line.rstrip()))
print(srt.compose(subtitles))