-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Let speak instructions without route progress. #32
Let speak instructions without route progress. #32
Conversation
5b91c77
to
7f56bd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment, I think your proposed version is not correct yet.
c1363df
to
39f9f27
Compare
39f9f27
to
e0339ef
Compare
@@ -264,8 +257,8 @@ public protocol VoiceControllerDelegate { | |||
|
|||
- parameter voiceController: The voice controller that will speak an instruction. | |||
- parameter instruction: The spoken instruction that will be said. | |||
- parameter routeProgress: The `RouteProgress` just before when the instruction is scheduled to be spoken. | |||
- parameter routeProgress: The `RouteProgress` just before when the instruction is scheduled to be spoken. Could be `nil` if no progress is available or if oit should be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- parameter routeProgress: The `RouteProgress` just before when the instruction is scheduled to be spoken. Could be `nil` if no progress is available or if oit should be ignored. | |
- parameter routeProgress: The `RouteProgress` just before when the instruction is scheduled to be spoken. Could be `nil` if no progress is available or if it should be ignored. |
Minor typo
@@ -360,7 +360,7 @@ extension ViewController: VoiceControllerDelegate { | |||
print(interruptedInstruction.text, interruptingInstruction.text) | |||
} | |||
|
|||
func voiceController(_ voiceController: RouteVoiceController, willSpeak instruction: SpokenInstruction, routeProgress: RouteProgress) -> SpokenInstruction? { | |||
func voiceController(_ voiceController: RouteVoiceController, willSpeak instruction: SpokenInstruction, routeProgress: RouteProgress?) -> SpokenInstruction? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a CHANGELOG entry for the changed APIs? Both here and for the RouteVoiceController?
return | ||
} | ||
|
||
open func speak(_ instruction: SpokenInstruction, with locale: Locale?, ignoreProgress: Bool = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I am not sure if we really need the ignoreProgress switch here?
We would need to make route progress optional as well for modifiedInstruction.attributedText(for: routeProgress.currentLegProgress)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need a CHANGELOG entry if we change public APIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM 👍
No description provided.