NRSpeechToText 1.0.0

NRSpeechToText 1.0.0

Maintained by ‘Naveen’.




  • By
  • naveenrana1309

NRSpeechToText

Version License Platform ScreenShot

Introduction

NRSpeechToText: This library provides the speech to text functionality with the help iOS speech framework.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Xcode 9+ , Swift 4 , iOS 9 and above

Plist Keys & Background Mode

Please make sure you have the below keys in your plist file before using the speech services.

<key>Privacy - Microphone Usage Description</key>
<string>We will use this microphone for testing our demo.</string>

<key>Privacy - Speech Recognition Usage Description</key>
<string>We will speech recognition for testing demo</string>

Installation

NRSpeechToText is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "NRSpeechToText"

Usage

@IBAction func microphoneButtonPressed(_ sender: AnyObject) {
NRSpeechToText.shared.authorizePermission { (authorize) in
if authorize {
if NRSpeechToText.shared.isRunning {
NRSpeechToText.shared.stop()
OperationQueue.main.addOperation {
self.microphoneButton.setTitle("Start Recording", for: .normal)

}

}
else {
OperationQueue.main.addOperation {
self.microphoneButton.setTitle("Stop Recording", for: .normal)

}
self.startRecording()

}


}
}

}

func startRecording() {
NRSpeechToText.shared.startRecording {(result: String?, isFinal: Bool, error: Error?) in
if error == nil {
self.textView.text = result
}
}
}

Contributing

Contributions are always welcome! (:

  1. Fork it ( http://github.com/naveenrana1309/NRSpeechToText/fork )
  2. Create your feature branch ('git checkout -b my-new-feature')
  3. Commit your changes ('git commit -am 'Add some feature')
  4. Push to the branch ('git push origin my-new-feature')
  5. Create new Pull Request

Compatibility

Xcode 9+ , Swift 4 , iOS 10 and above

Author

Naveen Rana. See Profile

Email: [email protected].

Check out Facebook Profile for detail.

License

NRSpeechToText is available under the MIT license. See the LICENSE file for more info.