davwheat / rail-announcements

Compilation of railway announcement snippets and a website to generate your own announcement snippets.
https://railannouncements.co.uk
MIT License
42 stars 17 forks source link

Handle multiple splitting locations #217

Open WilliamPells opened 3 months ago

WilliamPells commented 3 months ago

I was creating a big double split test train on the "standing train" section and it refuses to play.

Detailed info:

`EncodingError: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data

Error: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data`

at K (https://railannouncements.co.uk/9f38c194-43231ce3abd2ea088337.js:1:2532) at u (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:1522) at m (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:4325) at div at https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:15308 at div at I (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:8131) at https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:15037 at div at o (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:9893) at I (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:8131) at https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:10214 at https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:13736 at https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:15923 at div at https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:13736 at div at ne (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:18383) at main at https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:13736 at main at https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:13736 at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:195205) at Qn (https://railannouncements.co.uk/76d8c668-c01d13a149aa3b622446.js:1:38429) at RecoilRoot (https://railannouncements.co.uk/76d8c668-c01d13a149aa3b622446.js:1:40396) at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:287629) at p (https://railannouncements.co.uk/689577f30886a7ec6d84f438f5451ec0a24ddfa1-51ae9c03e0adefdf5a6f.js:1:2958) at be (https://railannouncements.co.uk/beaa6cd174c4c823946845c5593ee41b3efafd57-b9438fab4128485b21f1.js:1:20919) at o (https://railannouncements.co.uk/component---src-pages-stations-amey-celia-drummond-tsx-0fc8dabcf6891473aae7.js:1:488) at w (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:314939) at e at div at se (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:24792) at oe (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:24652) at ue (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:25526) at ce (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:25446) at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:287629) at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:318398) at o (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:321435) at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:200939) at t (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:319044) at https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:23540 at J (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:22751) at Q (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:23020) at WithErrorBoundary() at ee (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:24134) at n (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:320924) at r (https://railannouncements.co.uk/app-1f70e7de4c229afccf15.js:1:323110)

WilliamPells commented 3 months ago

Seemed to be fixed when I removed "Scottish Railways" and the notice to be in the front carriage at a short platform

WilliamPells commented 3 months ago

There also seems to be an issue with announcing multiple divides.

I'm trying to say that there are 11 coaches Kings Cross - Inverness. The front 3 detach and terminate at Inverness. 8 coaches continue to Dingwall, where the rear 4 go to Kyle of Loch' and the front 4 go to Thurso. The service that I set these coaches to detach from is the Kings Cross - Thurso.

The announcement gets correct that the 3 front detach at Inverness, but then doesn't mention the split at Dingwall and says all 8 coaches go up to Thurso. Any idea why?

WilliamPells commented 3 months ago

Link to my announcement:

https://railannouncements.co.uk/stations/amey-celia-drummond/?announcementId=ea9e999e-0f2a-4f0f-9cd5-0b7707b58b96

davwheat commented 2 months ago

This one is tricky because I don't think there was ever support for trains like this in the real-world system. The current script wouldn't work very nicely with such a train.

zwangsbremsung commented 2 months ago

i beleve there is something on TRUST that shows that the train splits and maybe on DARWIN but not sure

davwheat commented 2 months ago

The issue isn't data feeds, it's how my code converts the associations in Darwin, and how it converts multiple divides into a list of audio files correctly.

This issue isn't actually related to Darwin data (I think the only train potentially affected would be the Caledonian Sleeper, which also behaves as per the bug report), so the issue is really in the audio assembly logic.

zwangsbremsung commented 2 months ago

The issue isn't data feeds, it's how my code converts the associations in Darwin, and how it converts multiple divides into a list of audio files correctly.

This issue isn't actually related to Darwin data (I think the only train potentially affected would be the Caledonian Sleeper, which also behaves as per the bug report), so the issue is really in the audio assembly logic.

yeah would only effect the caledonian sleeper

tdubbs1 commented 2 months ago

This is a real-world Phil Sayer announcement for a three-portion splitting service at Littlehampton (not an actual service, pretty sure it was set up as a joke from the station office but nonetheless): -

https://www.youtube.com/watch?v=mMvpH65c-vc

From what I can hear -- the key difference between a two-portion splitting service and a three-portion one is that the latter does not include the initial stopping pattern (i.e. "Calling at [...], where the train will divide"), and instead skips straight to the "Please make sure you travel in the correct part of the train" audio -- before listing each portion's calling points.