Created
May 22, 2017 08:26
-
-
Save filipproch/642cb0d774ee20b94c7f84bcf77ce9aa to your computer and use it in GitHub Desktop.
This file contains 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
// AsrSessionOperator.kt | |
// nova metoda | |
fun setSensitivityLevel(newLevel: Float): Observable<CommandResponse> { | |
val bundle = Bundle() | |
bundle.putFloat(AsrControlCommand.EXTRA_SENSITIVITY, newLevel) | |
val cmd = AsrControlCommand(AsrControlCommand.CMD_UPDATE_SENSITIVITY_LEVEL, bundle) | |
return AsrServiceConnection.operator.sendAsrControlCommand(cmd) | |
} | |
private fun reactToStateChange(state: ActiveConfiguration) { | |
//... existujici kod | |
if (state.initialized && state.recognizing.not()) { | |
setSensitivityLevel(5f).subscribe() // nastavim sensitivityLevel po inicializaci ASR | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment