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

Android Drop-In UI: Is it possible to play voice instruction of incident when we are nearby the incident? #6359

Closed
Sridhar261990 opened this issue Sep 20, 2022 · 13 comments

Comments

@Sridhar261990
Copy link

Hello Team, I am using DropInUi for my application. I want to play the voice instruction when the driver is nearing the incident. I am getting incident information from the upcomingIncident.roadObject. Can I play the incident description by using the voice instructions?

implementation 'com.mapbox.navigation:ui-app:2.8.0-rc.2'
implementation 'com.mapbox.navigation:ui-dropin:2.8.0-rc.2'

@Guardiola31337
Copy link
Contributor

Hey @Sridhar261990 thanks for reaching out and report your question.

Yeah, you can play custom voice instructions. You can find an example on how to implement it in MapboxVoiceActivity from the examples test app 👀

binding.addPlay.setOnClickListener {
voiceInstructionsPlayer.play(
SpeechAnnouncement.Builder("Test hybrid speech player.").build(),
voiceInstructionsPlayerCallback
)
}

Please take a look at it and let us know if you have any follow-up questions.

Thanks for checking out the SDK.

@abhishek1508
Copy link
Contributor

There might be an issue here. In MapboxVoiceActivity, the app instantiates VoiceInstructionPlayer and hence has access to it to be able to invoke voiceInstructionsPlayer.play()

private val voiceInstructionsPlayer: MapboxVoiceInstructionsPlayer by lazy {
        val options = VoiceInstructionsPlayerOptions.Builder()
            .abandonFocusDelay(PLAYER_ABANDON_FOCUS_DELAY)
            .build()
        MapboxVoiceInstructionsPlayer(
            this,
            getMapboxAccessTokenFromResources(),
            Locale.US.toLanguageTag(),
            options
        )
    }

However, Drop-In UI doesn't exposes the voiceInstructionsPlayer. Hence users using Drop-In UI won't be able to play additional instructions. Therefore we would need to expose an API that would expose voiceInstructionsPlayer created via Drop-In UI. Can you confirm if my understanding is correct @Guardiola31337

@EricGeiler
Copy link

@Guardiola31337 Thanks for the input Pablo, your opinions are always valued, you've helped us a lot over the years.

@abhishek1508 This would be a "nice to have feature" but its far from blocking any releases on our end. My main concern is that the incident data I'm seeing in Canada isn't exactly short descriptions... I'm leary of having a driver try and read that qty of text while driving.... hence the feature request for audio.

Here are some of the shorter examples i've personally run into... both times I have travelling on roads with posted speed limits of 100 km/h, so I waited until I was stopped before looking ahead on the map to read incident text. not sure i want drivers to be reading this text while in motion at those speeds...
image

@abhishek1508 abhishek1508 changed the title Android - DropInUi : Is it possible to play voice instruction of incident when we are nearby the incident? Android Drop-In UI: Is it possible to play voice instruction of incident when we are nearby the incident? Sep 22, 2022
@abhishek1508
Copy link
Contributor

@EricGeiler Thanks for the detailed explanation. We will evaluate this request and come up with updates when we have a solution ready.

@EricGeiler
Copy link

@EricGeiler Thanks for the detailed explanation. We will evaluate this request and come up with updates when we have a solution ready.

Thank you for the update! Hopefully its a useful suggestion!

@Sridhar261990
Copy link
Author

Hi @abhishek1508, May I know the status of this feature request?

@abhishek1508
Copy link
Contributor

@abhishek1508 This would be a "nice to have feature" but its far from blocking any releases on our end.

@Sridhar261990 Can you share the priority of this issue? I was under the impression that it is not launch blocking and hence we haven't picked it up yet. However, needless to say this is still something we are tracking and is under our radar.

@Sridhar261990
Copy link
Author

@abhishek1508 It is not blocking. I am just curious to know when this feature will be available.

@EricGeiler
Copy link

@abhishek1508 its a nice to have feature I'd like to include in our follow up release to drivers, its NOT blocking our initial release.

@abhishek1508
Copy link
Contributor

abhishek1508 commented Oct 5, 2022

@EricGeiler Thanks for clarifying. Can you share an estimated date for the follow up release?
We will update the ticket once we have a working solution.

@EricGeiler
Copy link

EricGeiler commented Oct 5, 2022

Lets call it Oct 20-31th time frame as a ball park.
Getting a 2.8.0-release from @Sridhar261990 today, gonna run with that fleet wide for a couple of weeks, then attempt a move to 2.9.0+ unless something requires a more prompt update to 2.9.0+

@abhishek1508
Copy link
Contributor

This has been addressed #6475 and was released as a part of v2.9.0-beta.3

cc @EricGeiler @Sridhar261990

@abhishek1508
Copy link
Contributor

Closing as this issue has been resolved and feature delivered.

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

5 participants