# libXfSpeechCompoment **Repository Path**: lbh/libXfSpeechCompoment ## Basic Information - **Project Name**: libXfSpeechCompoment - **Description**: 科大讯飞 语音合成组件 - **Primary Language**: Android - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2015-09-04 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ##---------------------简介--------------------- ## 科大讯飞 语音合成组件 ##使用方便,统一管理 ## 示列: #1、在 Application oncreate 方法里初始化 XfSpeechAgent mXfSpeechAgent = XfSpeechAgent.getInstance(); mXfSpeechAgent.init(context,"appId"); //appId 为在讯飞 平台申请的 appid mXfSpeechAgent.setDebug(true); //打开 debug log #2、在掉用的 地方(Activity) 初始化 语音合成引擎 mXfSpeechAgent = XfSpeechAgent.getInstance(); if (!mXfSpeechAgent.isInitSpeechEngine()) { mXfSpeechAgent.initSpeechEngine(MainActivity.this); } #3、在需要的地方 调用语音合成 (播音) mXfSpeechAgent.setVoicer(Voicer.XIAOXIN); // 设置播音员(可选) mXfSpeechAgent.speak("测试语音合成,请多多支持!"); -------------------------------------------