SwiftUISpeechToText
A Swift Package which helps to implement Speech to Text functionality in SwiftUI
Import the package through SPM using: https://github.com/pandashashwat97/SwiftUISpeechToText.git
Usage
- Add two privacy properties into the info list of your SwiftUI Project
Start by importing SwiftUISpeechToText
- import SwiftUISpeechToText
Create a StateObject
- @StateObject var speechRecognizer = SpeechRecognizer()
Start transcribing
- Call function: speechRecognizer.transcribe()
Stop transcribing
- Call function: speechRecognizer.stopTranscribing()
Converted Text
- Use speechRecognizer.transcript as the converted text string
For more details about implementation please import and checkout the below project: https://github.com/pandashashwat97/SwiftUISpeechToTextDemo
Final Implementation:
Final.Speech.To.Text.Implementation.MP4