fl_kdxf_sst_rt
As shown in the figure below:
Welcome to my personal website:www.sshlearning.cn
Welcome to my github and invite you to build more:github.com/ssh199956
Welcome to my personal blog:blog.sshlearning.cn
Welcome to follow my document content:data.sshlearning.cn
Welcome to the static e-commerce website made during my study:shenfeng.sshlearning.cn
Getting started
A Flutter plugin that supports KDXF for Streaming voice dictation, suitable for Android, iOS and other platforms.
Usage
//'Attention, set this content first before using all content'
setKDXFInfo("", "", "", "");
class WsWidgetPage extends StatefulWidget {
@override
_WsWidgetPageState createState() => _WsWidgetPageState();
}
class _WsWidgetPageState extends State<WsWidgetPage>
with KDXFBaseSpeechRecognitionMixin {
@override
void initState() {
super.initState();
//this is your keys of kdxf.
setKDXFInfo("", "", "", "");
KDXFInit();
}
@override
void dispose() {
KDXFDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('讯飞语音转文字测试'),
),
body: Column(
children: [
ElevatedButton(
onPressed: () async {
await SoundRecord.startListening();
updateMsg = "录音中..";
},
child: Text('开始录音'),
),
ElevatedButton(
onPressed: KDXFStopListening,
child: Text('停止录音'),
),
Container(
height: 20,
),
Center(child: Text(showMsg)),
],
),
);
}
}
Property
- time:
time选择-vad_eos根据这个去修改
//这里我设置的是2秒钟的时间,科大讯飞默认是3秒,这个时间可以自定义的
//填充business
business['language'] = 'zh_cn';
business['domain'] = 'iat';
business['accent'] = 'mandarin';
business['ptt'] = 0;
business['vad_eos'] = 2000;
business['dwa'] = 'wpgs';
business['ptt'] = 1;
Libraries
- fl_kdxf_sst_rt
- fl_kdxf_sst_rt_method_channel
- fl_kdxf_sst_rt_platform_interface
- fl_kdxf_sst_rt_web
- kdxf_base_plugin_page
- kdxf_speech/kdxf_plugins/bean/response_data_entity
- kdxf_speech/kdxf_plugins/generated/json/base/json_convert_content
- kdxf_speech/kdxf_plugins/generated/json/base/json_field
- kdxf_speech/kdxf_plugins/generated/json/response_data_entity_helper
- kdxf_speech/kdxf_plugins/utils/base_kdxf
- kdxf_speech/kdxf_plugins/utils/sound_manage
- kdxf_speech/kdxf_plugins/utils/xf_manage
- kdxf_speech/kdxf_plugins/utils/xf_utils
- main
- siri_wave/siri_wave