@Test public void testRecogniseVoice() throws WxErrorException { String voiceId = System.currentTimeMillis() + "a"; AiLangType lang = AiLangType.zh_CN; final String result = this.wxService.getAiOpenService().recogniseVoice(voiceId, lang, new File("d:\\t.mp3")); System.out.println(result); }
@Override public String recogniseVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { this.uploadVoice(voiceId, lang, voiceFile); return this.queryRecognitionResult(voiceId, lang); }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public String recogniseVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { this.uploadVoice(voiceId, lang, voiceFile); return this.queryRecognitionResult(voiceId, lang); } }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public String recogniseVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { this.uploadVoice(voiceId, lang, voiceFile); return this.queryRecognitionResult(voiceId, lang); } WxMpAiOpenServiceImpl(WxMpService wxMpService); }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public String recogniseVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { this.uploadVoice(voiceId, lang, voiceFile); return this.queryRecognitionResult(voiceId, lang); } WxMpAiOpenServiceImpl(WxMpService wxMpService); @Override void uploadVoice(String voiceId, AiLangType lang, File voiceFile); @Override String recogniseVoice(String voiceId, AiLangType lang, File voiceFile); @Override String translate(AiLangType langFrom, AiLangType langTo, String content); @Override String queryRecognitionResult(String voiceId, AiLangType lang); }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public String recogniseVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { this.uploadVoice(voiceId, lang, voiceFile); return this.queryRecognitionResult(voiceId, lang); } WxMpAiOpenServiceImpl(WxMpService wxMpService); @Override void uploadVoice(String voiceId, AiLangType lang, File voiceFile); @Override String recogniseVoice(String voiceId, AiLangType lang, File voiceFile); @Override String translate(AiLangType langFrom, AiLangType langTo, String content); @Override String queryRecognitionResult(String voiceId, AiLangType lang); static final String TRANSLATE_URL; }