nfrankel
11/20/2017, 9:51 PMreturn when (response.resultsCount) {
0 -> "No match found, try again"
else -> {
val speechRecognitionResult = response.resultsList[0]
when (speechRecognitionResult.alternativesCount) {
0 -> "No match found, try again"
else -> speechRecognitionResult.alternativesList[0].transcript
}
}
}