use of com.ichi2.bd.MySyntherizer in project AnkiChinaAndroid by ankichinateam.
the class AbstractFlashcardViewer method initBDTTs.
private void initBDTTs() {
appId = Auth.getInstance(this).getAppId();
appKey = Auth.getInstance(this).getAppKey();
secretKey = Auth.getInstance(this).getSecretKey();
// 离线合成SDK必须有此参数;在线合成SDK没有此参数
sn = Auth.getInstance(this).getSn();
// 日志打印在logcat中
LoggerProxy.printable(true);
String tmpDir = FileUtil.createTmpDir(this);
// 设置初始化参数
// 此处可以改为 含有您业务逻辑的SpeechSynthesizerListener的实现类
SpeechSynthesizerListener listener = new FileSaveListener(mainHandler, tmpDir);
InitConfig config = getInitConfig(listener);
// 此处可以改为MySyntherizer 了解调用过程
synthesizer = new NonBlockSyntherizer(this, config, mainHandler);
if (!isOnlineSDK) {
Timber.i("SynthActivity" + "so version:" + SynthesizerTool.getEngineInfo());
}
}
Aggregations