26

Does anyone knows that if "speech to text" and "text to speech" api's used in Siri are accessible in IOS 5 or IOS 6 SDK?

I researched but couldn't find anything about it in documentation, so if thats not included in SDK are there any "Siri" quality libraries in market?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Spring
  • 11,333
  • 29
  • 116
  • 185
  • 1
    I know there's NSSpeechSynthesizer and NSSpeechRecognizer availbable on mac, but not for ios http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Speech/Speech.html#//apple_ref/doc/uid/10000178i – jbat100 Oct 19 '11 at 15:33

9 Answers9

14

Siri is not available in API form yet, however, any UITextField or UITextArea can be dictated to using the built-in option for speech-to-text.

Tim
  • 14,447
  • 6
  • 40
  • 63
  • tnx could you give some more explaination on this? how can I use it? – Spring Oct 19 '11 at 16:05
  • 4
    You do not have to "use" it at all - it is visible automatically to users who have that option. All you have to do is just set up your text input fields as if they are typed, and the user has to tap the keyboard's Dictation button. Direct voice control is not possible with this mechanism, unless you told the user to dictate commands and your text field parsed it- though this might have dubious submittability to the app store, given that it would be too similar to Siri and also confuse users. – Tim Oct 19 '11 at 21:41
12

Check out Openears at: http://www.politepix.com/openears I've used it experimentally and it worked great. It will recognize preset vocabularies very well. There is a slight pause of 1/2 second or so before it recognizes the word and it gets confused in an environment with a lot of voices (a crowded restaurant), but in a reasonably quiet setting I found it works great.

neils4fun
  • 199
  • 1
  • 10
  • Would Openears handle Speech to Text as well? So for example, you press a button, you speak into the phone and it converts the spoken word to a string in a text field? – jcrowson Jan 09 '12 at 17:26
  • 3
    It's been a while since I used it, I built a quick prototype that recognized a defined set of words. It worked brilliantly. I believe it also does speech to text but I don't have any direct experience with it. But I had contacted the project owner when I looked at it and he was extremely responsive and helpful. p.s. sorry for the delay in responding I haven't been back in Stack for a while. – neils4fun Feb 24 '12 at 15:07
  • OpenEars works great if you have a comprehensive set of words included in the configuration file. However it does not work if it does not find the word in the config file. So the question is - how to create or import a comprehensive config file with enough words in it to produce a satisfactory result? Is there a list of ALL conversational words available to use in the config? – CoolDocMan Nov 14 '13 at 18:08
  • @CoolDocMan They recommend that you constrain your "vocab" to about 300 words. That does not seem to be a hard limit, but performance will start to suffer as the size of your vocab increases (with more powerful devices less subject to this effect). OpenEars does all processing on-board...Siri and most other speech SDK's do it server-side. If you need something that recognizes unstructured language, it's probably not your tool. – Reid Jun 06 '14 at 23:15
  • OpenEars seems especially great since it internally uses the free and open-source Carnegie Mellon University Sphinx language recognition project, called CMU pocketSphinx. The pocketSphinx files can be adapted (albeit with some effort I guess) to adapt for particular accents such as Indian accent etc. – Bharat Mallapur Aug 04 '15 at 11:38
5

iOS 10 introduces a new speech recognition API - SFSpeechRecognizer.

https://developer.apple.com/videos/play/wwdc2016/509/

Steve Moser
  • 7,647
  • 5
  • 55
  • 94
3

After iOS 10 you can use

Speech.framework

It is very simple to use.Just import Speech into your class

import Speech

let speechRecogizer = SFSpeechRecognizer(locale: Locale.init(identifier: "en-US"))!  //locale whatever you want to use
let recognitionRequest = SFSpeechAudioBufferRecognitionRequest()
let recognitionTask:SFSpeechRecognitionTask = speechRecogizer.recognitionTask(with: recognitionRequest, resultHandler: { (result, error) in 
    print(result?.bestTranscription.formattedString) //here you can get your text 
})

You can also check https://github.com/PKrupa94/SpeechManager for it.

Donal
  • 6,082
  • 2
  • 19
  • 30
3

Siri is only available as a beta on iPhone 4S, not sure if the plan is to spread it to all iOS 5 capable devices. Open source libraries for voice recognition are hard to come by. You could look into Nuance (dragon) developer gateway here.

jbat100
  • 16,757
  • 4
  • 45
  • 70
  • 2
    To the person who downvoted, I know this is no longer the case, but it was in october 2011 when this answer was given. So giving the additional information would perhaps be a better approach. – jbat100 Jun 27 '12 at 07:59
3

You might also want to check out ispeech's text to speech and speech recognition APIs. They already allow you to include it in your apps without much trouble and actually are a bit better than what Siri has. Siri's big strength is the NLP, not so much the underlying speech tech.

flatux
  • 39
  • 1
2

We've made an SDK for isolated words (or small phrases) recognition, CeedVocal SDK. We use it in our own app Vocalia. It's not free though (but there's free trial), more information at: http://www.creaceed.com/ceedvocal

rsebbe
  • 334
  • 3
  • 7
2

For speech recognition you can use OpenEars (http://www.politepix.com/openears/) which works offline and provide good accuracy.OpenEars is free to use in an iPhone or iPad app. Yes OpenEars handles Speech to Text function.

2

Siri is not available to Developers yet.

Dancreek
  • 9,524
  • 1
  • 31
  • 34