提交 09c64f8c 作者: 王苏进

feat: 调试

上级 2af74d16
...@@ -2,6 +2,7 @@ package com.example.aivoice_plugin ...@@ -2,6 +2,7 @@ package com.example.aivoice_plugin
import android.app.Application import android.app.Application
import android.content.Context import android.content.Context
import android.util.Log
import androidx.annotation.NonNull import androidx.annotation.NonNull
import com.bytedance.speech.speechengine.SpeechEngineGenerator import com.bytedance.speech.speechengine.SpeechEngineGenerator
import io.flutter.embedding.engine.plugins.FlutterPlugin import io.flutter.embedding.engine.plugins.FlutterPlugin
...@@ -71,14 +72,8 @@ class AivoicePlugin: FlutterPlugin, MethodCallHandler, EventChannel.StreamHandle ...@@ -71,14 +72,8 @@ class AivoicePlugin: FlutterPlugin, MethodCallHandler, EventChannel.StreamHandle
asrCenter.uninitEngineBtnClicked() asrCenter.uninitEngineBtnClicked()
} }
"startOrStopEngine" -> { "startOrStopEngine" -> {
val isBegin = (call.arguments as Map<*, *>).get("isBegin") Log.i("aivoic_plugin", "开始识别了")
if(isBegin == true) {
println("开始识别~")
asrCenter.startEngineBtnClicked() asrCenter.startEngineBtnClicked()
} else {
asrCenter.stopEngineBtnClicked()
}
} }
"prepareEnvironment" -> { "prepareEnvironment" -> {
val re = SpeechEngineGenerator.PrepareEnvironment(context, context as Application?) val re = SpeechEngineGenerator.PrepareEnvironment(context, context as Application?)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论