Recommendations on getting app to speak to driver

Hi

I am developing an app which will provide near real-time feedback (ie, minimum speed in a turn) to drivers during track events. (Track events put a driver on a race track for either head-to-head racing or for teaching a driver to drive fast and safe on a race track.) I want the feedback to be audio (ie, a voice) rather than a display. But, there are so many options available (Siri, Carplay, notifications, etc) that I don't know what might be best.

Right now, I'd just like the app to announce the contents of a UILabel. What would be your recommendations?

In the very long term, I'd like the app to respond to driver's voice (for selecting which metric to feedback).

My particular model year of car does not support CarPlay, so I'd have to rule CarPlay.

(Beyond getting the app to talk, I also have to determine the best way to get the spoken messages to the driver. Do I use Bluetooth to connect to my car's audio, or use the remote audio plug of the car, or attempt to get the audio into the speakers many drivers have in their helmets. But that is a topic for another day...)

Thanks for your feedback.

Replies

I understand you need very realtime message. So forget Siri, too much latency.

To speak a label, just use AVSpeechSynthesizer.

here is a String extension, which is used as "Hey driver, turn left in 200 meters".speakIt()

import AVFoundation

extension String {

  func speakIt() -> AVSpeechSynthesizer? {
        
        let synthesizer = AVSpeechSynthesizer()
        let utterance = AVSpeechUtterance(string: self)
        utterance.volume = 1.0
        utterance.rate = 0.45 // adapt to what you find best
        synthesizer.speak(utterance)

        return synthesizer
    }
}
  • In my original post, I should have said near real-time. I have updated the post to so say.

    Some values are not know immediately. For example, I can't determine minimum turn speed until the cay has exited the turn. In most case, the minimum speed will occur well before the car exists the turn.

    Most driver aids today provide feedback only after the track session has ended. And, it might days or weeks before the data is actually reviewed. Thus, providing feedback on near real-time should provide a tremendous advantage compared to traditional approaches.

    Thanks for your feed back Claude31.

  • Thanks for the feedback. Don't forget to close the thread once you've got a correct answer. Good continuation.

Add a Comment