The API should take revision id and segment id as input parameters instead of text. Before making the request to Speechoid, there should be a check that the revision has not been deleted. This has been prepared in T246084.
The needed changes in the storage.js:requestTts() is to send revision id and segment id to the WikispeechListen API instead of the text.
WikispeechListen need to be modified to first check that the revision is not deleted, then request the (already cached text) from the Wikispeech API (segmenter).