|
|
|
@ -256,10 +256,11 @@ class AzureSpeechPlugin : BleService.Callback, FlutterPlugin { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
override fun onError(error: String) { |
|
|
|
override fun onError(code: Int, error: String) { |
|
|
|
sendAsrEvent( |
|
|
|
mapOf( |
|
|
|
"type" to "error", |
|
|
|
"code" to code, |
|
|
|
"message" to error |
|
|
|
) |
|
|
|
) |
|
|
|
@ -386,8 +387,8 @@ class AzureSpeechPlugin : BleService.Callback, FlutterPlugin { |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
override fun onError(error: String) { |
|
|
|
result.error("RECOGNITION_ERROR", error, null) |
|
|
|
override fun onError(code: Int, error: String) { |
|
|
|
result.error(code.toString(), "错误码: $code, 错误信息: $error", null) |
|
|
|
} |
|
|
|
}, audioSourceType) |
|
|
|
} catch (e: Exception) { |
|
|
|
|