Open barbeau opened 8 years ago
I wondered about that. For personal use, I configured OBA for Puget Sound stop #2245. Before the most recent system shakeup, route 8 would show "MLK JR WY" on the physical headsign, but Alexa would say "Martin Luther King Junior Way". I assumed that whatever API we are calling already emits a speech-friendly variant.
What do you think is the best way to implement this suggestion? Will anyone outside of this Alexa skill want a pronounceable headsign?
What do you think is the best way to implement this suggestion?
Not sure yet :). I need to look into it further. The oba-client-library is a relatively new (as in I did it for this project) direct port of the OBA Android client code, and it may need some tweaking. I've noticed some post processing there when compared to the raw GTFS, like converting to title case, that may not be the best overall design. So leaving raw GTFS may help some. There are other items that we will likely need to adjust for specifically for this project.
Will anyone outside of this Alexa skill want a pronounceable headsign?
Good question - There is a built-in serverside IVR app in the OBA server stack, and I know it's in use in some regions. IVR clients (of which you could consider Alexa one) would be the primary use case. Some of this might be fed eventually to Google Now and other Android voice interface components.
On a related note, I ended up doing some preprocessing for OBA Google Glass that may be useful, but in reverse. I converted all North/South/Boulevard/etc to their abbreviations - may be useful to do the reverse here. I'll see if I can dig up a link to that code.
For MLK example - when you say physical headsign, do you mean inside the bus? I doubt the bus headsign would match GTFS exactly, although in some cases it may. Most likely the GTFS had it spelled out, but I would be interested if you could pull the exact text sent to Alexa for this. Alexa might be doing preprocessing too.
There is an open GTFS proposal for new fields specifically design to hold Text-To-Speech information that should help resolve this issue: https://github.com/google/transit/pull/49
Summary:
We should allow defining particular pronunciations of specific regional GTFS stops/routes.
Steps to reproduce:
Set region to Tampa, stop to 6497, ask for arrivals.
Expected behavior:
"Uatc" in trip headsigns should be pronounced as the letters, or "University Area Transit Center".
Observed behavior:
Alexa pronounces it as " U-act".
Device:
Amazon Echo