Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved OSRM voice and banner instructions #4640

Open
3 tasks
Trietes opened this issue Mar 19, 2024 · 6 comments
Open
3 tasks

Improved OSRM voice and banner instructions #4640

Trietes opened this issue Mar 19, 2024 · 6 comments

Comments

@Trietes
Copy link
Contributor

Trietes commented Mar 19, 2024

I just had the time to test out the new banner and voice instructions of Valhalla in the Mapbox Navigation SDK. I've just did some testing and probably I'll try out Maplibre soon. First huge thanks for bringing it to Valhalla @eikes ! Was a quiet good experience to get it working.
I just want to collect few things I've noticed while using it, so it can be improved. Maybe somebody else also has some feedback, so we can collect it here.

  • The ssmlAnnouncement for the voice instructions seems to be required for the SDK. As a simple workaround I just wrapped the normal announcement into a opening and closing 'speak' tag and added it as ssmlAnnouncement. For example "Your destination is on the right." will be added as "<speak>Your destination is on the right.</speak>". Might be interesting to add this into Valhalla to make it compatible and later on also have the possibility to add more detailed ssml instructions.
  • One thing which is little annoying is that there are too many voice instructions. Especially right before doing a turn the navigation system is talking constantly. Valhalla is returning e.g. this here:
"voiceInstructions": [
    {
         "announcement": "Rechts abbiegen.",
         "distanceAlongGeometry": 76.3
     },
     {
         "announcement": "Rechts abbiegen. Dann Das Ziel wird erreicht.",
         "distanceAlongGeometry": 26.3
     }
 ]

This step is 100 meters long and has those two instructions during that distance. It could replaced with one voice instruction. Comparing it with other APIs, there is just the second instruction which is speaked out right in the middle between those two.

  • There shouldn't be any voice and banner instructions in the last step of the OSRM answer. This leads to having two banner instructions with "destination reached" in the banner view:
    grafik
@Trietes
Copy link
Contributor Author

Trietes commented Mar 26, 2024

Just wanted to give a small update on this. PR #4644 is solving point 1&3 from the list.
Fine tuning the voice instructions itself is little more complicated. As already mentioned in the original PR which added voice instructions, it would e.g. need adding distance information for the alert voice instructions. I'm going to play around and experiment some things on a local build to improve the instructions and timings. I've to see if I'll have another PR on this. At least I'll share my experience with it here.

@eikes
Copy link
Contributor

eikes commented Apr 5, 2024

Thank you for your appreciation.

Yes. I wholeheartedly agree, that there are too many voiceInstructions now. We really need to dial it down a bit. My assumption was, that when the Maneuver instance has the instructions we should pass them on. But we might need to add some heuristics to make this less annoying.

I would be curious to find out under what circumstances the verbal_pre_transition_instruction is present.

I will give your PR a spin soon!

@eikes
Copy link
Contributor

eikes commented Apr 5, 2024

I noticed that there is another thing missing:

voiceLocale is an attribute within each of the routes which, you might have guessed it, the locale of the voice instructions. We should also add that.

@eikes
Copy link
Contributor

eikes commented Apr 5, 2024

I opened an issue for this: #4677

I will work on it too

@Trietes
Copy link
Contributor Author

Trietes commented Apr 5, 2024

On my local valhalla, I've now an okay-ish version of voice instructions. At least it is usable now for me and I'm not getting annoyed while driving. Even though I think you can spend weeks on fine-tuning it.

I can open a PR on it soon and comment all my changes, so we can have some discussion on it. I bet you'll also have some ideas so we can hopefully get a nice update to the instructions.

@eikes
Copy link
Contributor

eikes commented Apr 8, 2024

@Trietes Looking forward to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants