Reputation: 946
I have a question regarding the integration of the speech to text iOS library called SFSpeechRecognizer. I need SFSpeechRecognizer to recognize terms that are not present in the iOS dictionary like medication names, chemistry terms, etc. I would have to add them, somehow, for SFSpeechRecognizer to be able to recognise them. Is this possible? Thanks
Upvotes: 0
Views: 447
Reputation: 519
Add your words to the
SFSpeechRecognitionRequest.contextualStrings array:
let request = SFSpeechURLRecognitionRequest(url: fileUrl)
request.contextualStrings = ["twersht", "baglom"]
now "My baglom is very twersht" will be returned by the SFSpeechRecognizer after you say it.
Upvotes: 1