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
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [版本 10.0.19045.5131], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.3)
[√] Android Studio (version 2024.2)
[√] IntelliJ IDEA Ultimate Edition (version 2024.2)
[√] VS Code (version 1.95.2)
[!] Proxy Configuration
! NO_PROXY is not set
[√] Connected device (4 available)
[√] Network resources
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered:
不管是执行你的样例 DEMO还是我自己的集成。
下面的这段 onSuccess 只会被触发一次,就是整个识别结束的时候,而不是逐字,甚至不是一小段一小段的,而是完成的长语音文本:
/// 语音识别结果监听
SpeechXf.onSpeechResultListener(
onSuccess: (result, isLast) {
if (mounted) {
speechController.text = speechController.text + result;
}
if (isLast) {
showToast('结束说话...', position: ToastPosition.bottom);
}
},
onError: (error) {
showToast(error);
},
);
以下 是部分日志:
D/MSC_LOG ( 9299): JNI_IsrResultCB
D/MSC_LOG ( 9299): JNI_IsrResultCB AttachCurrentThread
D/MSC_LOG ( 9299): JNI_IsrResultCB get result chararray
D/MSC_LOG ( 9299): JNI_IsrResultCB get sessionID chararray
D/MSC_LOG ( 9299): JNI_IsrResultCB CallVoidMethod
D/MscRecognizer( 9299): rsltCb:0result:{"sn":6,"ls":false,"bg":0,"ed":0,"pgs":"rpl","rg":[1,5],"ws":[{"bg":0,"cw":[{"sc":0.0,"w":"我会"}]},{"bg":0,"cw":[{"sc":0.0,"w":"说"}]},{"bg":0,"cw":[{"sc":0.0,"w":"一"}]},{"bg":0,"cw":[{"sc":0.0,"w":"段"}]},{"bg":0,"cw":[{"sc":0.0,"w":"很长"}]},{"bg":0,"cw":[{"sc":0.0,"w":"的"}]}]}
D/MSC_LOG ( 9299): JNI_IsrResultCB DetachCurrentThread
D/MscSpeechLog( 9299): false anddjsun false
D/MscSpeechLog( 9299): msc result time:1732340577139
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"我会"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"说"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"一"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"段"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"很长"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"的"}
D/============>xf_log:( 9299): 我会说一段很长的
D/MSC_LOG ( 9299): JNI_IsrResultCB
D/MSC_LOG ( 9299): JNI_IsrResultCB AttachCurrentThread
D/MSC_LOG ( 9299): JNI_IsrResultCB get result chararray
D/MSC_LOG ( 9299): JNI_IsrResultCB get sessionID chararray
D/MSC_LOG ( 9299): JNI_IsrResultCB CallVoidMethod
D/MscRecognizer( 9299): rsltCb:0result:{"sn":7,"ls":false,"bg":0,"ed":0,"pgs":"rpl","rg":[1,6],"ws":[{"bg":0,"cw":[{"sc":0.0,"w":"我会"}]},{"bg":0,"cw":[{"sc":0.0,"w":"说"}]},{"bg":0,"cw":[{"sc":0.0,"w":"一"}]},{"bg":0,"cw":[{"sc":0.0,"w":"段"}]},{"bg":0,"cw":[{"sc":0.0,"w":"很长"}]},{"bg":0,"cw":[{"sc":0.0,"w":"的"}]},{"bg":0,"cw":[{"sc":0.0,"w":"文章"}]}]}
D/MSC_LOG ( 9299): JNI_IsrResultCB DetachCurrentThread
D/MscSpeechLog( 9299): false anddjsun false
D/MscSpeechLog( 9299): msc result time:1732340577448
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"我会"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"说"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"一"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"段"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"很长"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"的"}
D/>>>>>>>>>>>( 9299): {"sc":0,"w":"文章"}
D/============>xf_log:( 9299): 我会说一段很长的文章
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [版本 10.0.19045.5131], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.3)
[√] Android Studio (version 2024.2)
[√] IntelliJ IDEA Ultimate Edition (version 2024.2)
[√] VS Code (version 1.95.2)
[!] Proxy Configuration
! NO_PROXY is not set
[√] Connected device (4 available)
[√] Network resources
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered: