Closed salution closed 5 years ago
Hey @salution ,
Sorry for the late reply on this. After further investigation, I think I found out what is the issue. the voiceOverlayController instance is always being recalculated and we're losing reference to the one created everytime. In order to solve this, you can initialise your voiceOverlayController lazily like so and it will solve your problem:
lazy var voiceOverlayController: VoiceOverlayController = {
let recordableHandler = {
return SpeechController(locale: Locale(identifier: "en_US"))
}
return VoiceOverlayController(speechControllerHandler: recordableHandler)
}()
I also updated the snippet in the README
Cheers!
I use set locate like this