-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Is there an existing issue for this?
- I have searched the existing issues
Use case
When building navigation apps with custom voice announcements (e.g., toll section warnings, speed alerts), there's no way to coordinate timing with the SDK's built-in voice guidance. This causes overlapping speech where neither message is audible, resulting in a poor user experience.
Currently, we can only estimate when the SDK might be speaking based on NavInfo.distanceToNextStepMeters, but this is unreliable since:
- Announcement timing varies by maneuver type and road conditions
- Traffic alerts and rerouting announcements are unpredictable
- Different languages have different speech durations
Proposal
Add event callbacks to notify when voice guidance speech starts and completes:
// Option A: Dedicated listener
GoogleMapsNavigator.setVoiceGuidanceListener((VoiceGuidanceEvent event) {
switch (event) {
case VoiceGuidanceStarted(instruction: final text):
// SDK started speaking - pause custom TTS queue
case VoiceGuidanceCompleted():
// SDK finished speaking - resume custom TTS queue
}
});
// Option B: Property on NavigationAudioGuidanceSettings
GoogleMapsNavigator.setAudioGuidance(
NavigationAudioGuidanceSettings(
guidanceType: NavigationAudioGuidanceType.alertsAndGuidance,
onSpeechStart: (String instruction) => ...,
onSpeechComplete: () => ...,
),
);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.