SFSpeechRecognizer multiple languages

北城以北 提交于 2019-12-24 12:35:04

问题


I am building a search that supports voice recognition and transforms speech to text so I am using SFSpeechRecognizer. But the problem is that I need to support multiple languages at the same time such as ("en_US", "fr", vi, ar).

The main idea is that the user can speak for example 1 word in English and the other in French and I want the engine to detect this.

Currently, I am using this to set my main language

ENGLISH:

private let speechRecognizer = SFSpeechRecognizer(locale: Locale.init(identifier: "en_US"))!

FRENCH:

 private let speechRecognizer = SFSpeechRecognizer(locale: Locale.init(identifier: "fr"))!

Every language I need to set it separately.

Is there a way so SFSpeechRecognizer supports multiple languages at the same time?

来源:https://stackoverflow.com/questions/56270710/sfspeechrecognizer-multiple-languages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!