Created
October 30, 2020 18:57
-
-
Save yektasarioglu/8443c9c543f3d57f7d610afdfbded611 to your computer and use it in GitHub Desktop.
startRecognizeWithSpeechPickupUI() and startRecognizeWithoutSpeechPickupUI()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun startRecognizeWithSpeechPickupUI() { | |
val intent = Intent(activity, MLAsrCaptureActivity::class.java) | |
.putExtra(MLAsrCaptureConstants.LANGUAGE, ENGLISH_LANGUAGE_CODE) | |
.putExtra(MLAsrCaptureConstants.FEATURE, MLAsrCaptureConstants.FEATURE_WORDFLUX) | |
startActivityForResult(intent, ASR_RESULT_CODE) | |
} | |
private fun startRecognizeWithoutSpeechPickupUI() { | |
val intent = Intent(MLAsrConstants.ACTION_HMS_ASR_SPEECH) | |
.putExtra(MLAsrCaptureConstants.LANGUAGE, ENGLISH_LANGUAGE_CODE) | |
.putExtra(MLAsrCaptureConstants.FEATURE, MLAsrCaptureConstants.FEATURE_WORDFLUX) | |
asrRecognizer.startRecognizing(intent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment