You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val config = YandexSpeechToText.Config(
enablePartialResults = false,
enableLoggingData = true
)
val iAmTokenGenerator =
IAmTokenGenerator("OAuth")
val yandexSpeechKitRecognizer = YandexSpeechToText(
iAmTokenGenerator,
"folderId",
Language.EN,
config
)
if (ActivityCompat.checkSelfPermission(
this,
Manifest.permission.RECORD_AUDIO
) != PackageManager.PERMISSION_GRANTED
) {
checkPermissions()
} else {
val r = yandexSpeechKitRecognizer.startRecognition()
GlobalScope.launch {
r.consumeEach { it ->
Log.i(TAG, "$it")
}
}
}
После отправки пары сообщений падает
java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception kotlin.UninitializedPropertyAccessException: lateinit property eventChannel has not been initialized, but then emission attempt of value '[B@15100dc' has been detected.
Emissions from 'catch' blocks are prohibited in order to avoid unspecified behaviour, 'Flow.catch' operator can be used instead.
For a more detailed explanation, please refer to Flow documentation., but then emission attempt of value '[B@3e895e5' has been detected.
Помогите, пожалуйста
The text was updated successfully, but these errors were encountered:
Дело в том, что YandexSpeechToText, как и любой STT компонент, наследуется от абстрактного класса SpeechToText, для работы которого необходимо инициализировать eventChannel (свойство типа SendChannel, которое необходимо, для передачи пользователю Aimybox событий STT компонента), данное свойство объявлено как internal, поэтому чтобы запустить SpeechToText, необходимо либо запускать его в составе Aimybox, либо выкачивать код модуля core и инициализировать в нем eventChannel самостоятельно
Создал согласно документации
После отправки пары сообщений падает
java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception java.lang.IllegalStateException: Flow exception transparency is violated:
Previous 'emit' call has thrown exception kotlin.UninitializedPropertyAccessException: lateinit property eventChannel has not been initialized, but then emission attempt of value '[B@15100dc' has been detected.
Emissions from 'catch' blocks are prohibited in order to avoid unspecified behaviour, 'Flow.catch' operator can be used instead.
For a more detailed explanation, please refer to Flow documentation., but then emission attempt of value '[B@3e895e5' has been detected.
Помогите, пожалуйста
The text was updated successfully, but these errors were encountered: