mapbox / mapbox-navigation-android

Mapbox Navigation SDK for Android
https://docs.mapbox.com/android/navigation/overview/
Other
622 stars 319 forks source link

Android - Drop In UI - Hearing two different voices while starting navigation. #6769

Closed Sridhar261990 closed 1 year ago

Sridhar261990 commented 1 year ago

Hi Team,

I am getting two different voice instructions while starting the navigation. Please see the attached video.

https://user-images.githubusercontent.com/95765713/208960207-d4a8ee4e-a13d-460e-9049-e67646b54fec.mp4

Mapbox Navigation SDK version:
implementation 'com.mapbox.navigation:ui-app:2.10.0-rc.1' implementation 'com.mapbox.navigation:ui-dropin:2.10.0-rc.1'

Please check it and let me know how to fix this issue.

abhishek1508 commented 1 year ago

@Sridhar261990 There is a known issue where Nav SDK is playing the instruction first using offline TTS player and then using online Polly TTS player. We are working towards a fix for it.

However in this case, it is playing 2 different instructions. Looking at the video, it seems like based on the bearing of the puck the Nav SDK still is trying to understand where the user is heading. Once it is ready and the puck is stable it plays another instruction as if you just rerouted.

Can you share another video using a different route

@dzinad

Sridhar261990 commented 1 year ago

Hi @abhishek1508, Please check the same issue with different route.

https://user-images.githubusercontent.com/95765713/208969778-402e9180-d9bf-4b34-88d1-ada0efe9f429.mp4

abhishek1508 commented 1 year ago

Thank you for sharing this @Sridhar261990 This doesn't look like an issue to me. This looks like a reroute is happening. Take a look at the video at5th sec. You will see that the original route request has its origin set to a different location than your current location. Hence you see the route line starting from that origin. The voice instruction is played considering that you will start from where the route line starts. Then immediately the SDK realizes that your puck is in a different location and makes a reroute request and hence you get a different instruction.

This looks like the correct behavior to me. Wdyt @dzinad

Screenshot_2022-12-21-10-06-07-66_320a9a695de7cdce83ed5281148d6f19.jpg

dzinad commented 1 year ago

Agreed that it's now expected, however, there is a related ticket on our side to think how we can improve user experience in similar cases (NAVAND-616).

Sridhar261990 commented 1 year ago

Hi @abhishek1508, It would be nice If we have any work around to avoid the sharp voice.

Sridhar261990 commented 1 year ago

@abhishek1508 We have faced similar issue with early versions of mapbox standalone sdk and Rafa provided the below solution.

https://github.com/mapbox/mapbox-navigation-android/blob/release-v1.4/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/voice/SpeechPlayerProvider.java#L64

dzinad commented 1 year ago

It would be nice If we have any work around to avoid the sharp voice.

I don't believe you can disable the TTS. Could you share your use case for this? If you disable it, in cases of low or absent connectivity the instruction won't be played at all. And just to remind you, we are working on a fix of an issue when the first instruction is being played first using the TTS and then is being repeated with an online player.

EricGeiler commented 1 year ago

@dzinad @abhishek1508

I wanted to provide some additional context. I'm using 2.10.0.rc1 with the Drop In UI for Android.

On a physical device (Sonim XP 10 running Android 12 for example) when starting navigation, I hear the first nav instruction play in the "low bandwidth" / "sharp" voice, once instruction has fully played, I then hear the "normal" voice play the same instruction.

This seems to have appeared in 2.10.0-rc1 has it was not present in the previous build I got from our dev.

This does not seem to be happening on every single nav request, it seems to be somewhat random. I've replicate while in the office on WIFI, and also stationary at the office on mobile data. I've also observed this happening when leaivng my house and starting navigation to the office, as part of my testing regiment.

Its seems like its able to be reproduced with more frequency on "shorter routes" if that means anything useful.

https://user-images.githubusercontent.com/61550186/210364060-5ef58c5a-2e36-4708-a5a0-878cbbdbbfee.mp4

2023-01-03 07:54:10: MapSearchActivity - https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-79.4442041,44.0619932;-79.444107,44.062005?access_token=*******************&geometries=polyline6&alternatives=true&overview=full&steps=true&continue_straight=true&annotations=congestion_numeric%2Cspeed%2Cdistance%2Cduration&language=en&roundabout_exits=true&voice_instructions=true&banner_instructions=true&voice_units=metric&exclude=toll&enable_refresh=true&snapping_include_closures=true%3Btrue&snapping_include_static_closures=true%3Btrue&max_height=1.6&max_width=1.9&max_weight=2.5 2023-01-03 07:54:10: MapSearchActivity -NavigationRoute#id jNG84wlzIaM_pBS9BpZPIq_BZGjr1i-Nc9Zr20D_WpL0bFOtBrxbeQ==#0 2023-01-03 07:54:10: MapSearchActivity -DirectionsResponse#uuid jNG84wlzIaM_pBS9BpZPIq_BZGjr1i-Nc9Zr20D_WpL0bFOtBrxbeQ== 2023-01-03 07:54:10: MapSearchActivity - onRouteFetchSuccessful -NavigationRoute#id jNG84wlzIaM_pBS9BpZPIq_BZGjr1i-Nc9Zr20D_WpL0bFOtBrxbeQ==#0 2023-01-03 07:54:10: MapSearchActivity - onRouteFetchSuccessful -DirectionsResponse#uuid jNG84wlzIaM_pBS9BpZPIq_BZGjr1i-Nc9Zr20D_WpL0bFOtBrxbeQ==

https://user-images.githubusercontent.com/61550186/210364459-eac19be7-d5a3-424e-afce-a38b633e02d7.mp4

2023-01-03 08:03:09: MapSearchActivity -NavigationRoute#id jWBxUWivH6MLhrs14_KeAvtHu90HuUSu8aFFwmIJNdFLiqblK_kXKg==#0 2023-01-03 08:03:09: MapSearchActivity -DirectionsResponse#uuid jWBxUWivH6MLhrs14_KeAvtHu90HuUSu8aFFwmIJNdFLiqblK_kXKg== MapSearchActivity - onRouteFetchSuccessful -NavigationRoute#id jWBxUWivH6MLhrs14_KeAvtHu90HuUSu8aFFwmIJNdFLiqblK_kXKg==#0 MapSearchActivity - onRouteFetchSuccessful -DirectionsResponse#uuid jWBxUWivH6MLhrs14_KeAvtHu90HuUSu8aFFwmIJNdFLiqblK_kXKg==

MapSearchActivity -NavigationRoute#id zVNaY5kuNBq57L51KL7hC9IXOZGzvX-uDvvpsmacsQVACbUlHv8f1w==#0 MapSearchActivity -DirectionsResponse#uuid zVNaY5kuNBq57L51KL7hC9IXOZGzvX-uDvvpsmacsQVACbUlHv8f1w== MapSearchActivity - onRouteFetchSuccessful -NavigationRoute#id zVNaY5kuNBq57L51KL7hC9IXOZGzvX-uDvvpsmacsQVACbUlHv8f1w==#0 MapSearchActivity - onRouteFetchSuccessful -DirectionsResponse#uuid zVNaY5kuNBq57L51KL7hC9IXOZGzvX-uDvvpsmacsQVACbUlHv8f1w==

MapSearchActivity -NavigationRoute#id F08KIma_iAj2DY1kSzgoLZubcLaxPPbi6MURwbsB5sfu56oqV6dYRg==#0 MapSearchActivity -DirectionsResponse#uuid F08KIma_iAj2DY1kSzgoLZubcLaxPPbi6MURwbsB5sfu56oqV6dYRg== MapSearchActivity - onRouteFetchSuccessful -NavigationRoute#id F08KIma_iAj2DY1kSzgoLZubcLaxPPbi6MURwbsB5sfu56oqV6dYRg==#0 MapSearchActivity - onRouteFetchSuccessful -DirectionsResponse#uuid F08KIma_iAj2DY1kSzgoLZubcLaxPPbi6MURwbsB5sfu56oqV6dYRg==

dzinad commented 1 year ago

@EricGeiler thanks for your feedback, it looks exactly like the issue we are working on (that Abhishek described here: https://github.com/mapbox/mapbox-navigation-android/issues/6769#issuecomment-1361683943).

EricGeiler commented 1 year ago

@dzinad Thanks for the confirmation, I'll follow along watching for a PR on this.

abhishek1508 commented 1 year ago

@EricGeiler This issue is fixed here and merged to main. However, we don't have any releases scheduled this week. The fix will be available next week with scheduled release

EricGeiler commented 1 year ago

@abhishek1508 I see this is noted as resolved in 2.11.x, we will wait for a stable release before updating. I advised @Sridhar261990 to update to 2.10.1 for now while we wait for 2.11 to move to beta from alpha.

abhishek1508 commented 1 year ago

@EricGeiler This issue was made a part of v2.10.0 release. You can find it under Bug fixes and improvements with the following entry

Fixed an issue where the first voice instruction might have been played twice. #6766

Once you upgrade to v2.10.0, you should not see it anymore.

EricGeiler commented 1 year ago

@abhishek1508 Thx!

EricGeiler commented 1 year ago

please close this ticket @Sridhar261990 issue is resolved in 2.10.1