@Test public void testUploadVoice() throws WxErrorException { String voiceId = System.currentTimeMillis() + "a"; AiLangType lang = AiLangType.zh_CN; this.wxService.getAiOpenService().uploadVoice(voiceId, lang, new File("d:\\t.mp3")); }
@Override public void uploadVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { if (lang == null) { lang = AiLangType.zh_CN; } this.wxMpService.execute(VoiceUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(VOICE_UPLOAD_URL, "mp3", voiceId, lang.getCode()), voiceFile); }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public void uploadVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { if (lang == null) { lang = AiLangType.zh_CN; } this.wxMpService.execute(VoiceUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(VOICE_UPLOAD_URL, "mp3", voiceId, lang.getCode()), voiceFile); } }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public void uploadVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { if (lang == null) { lang = AiLangType.zh_CN; } this.wxMpService.execute(VoiceUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(VOICE_UPLOAD_URL, "mp3", voiceId, lang.getCode()), voiceFile); } WxMpAiOpenServiceImpl(WxMpService wxMpService); }
WxMpAiOpenServiceImpl implements WxMpAiOpenService { @Override public void uploadVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { if (lang == null) { lang = AiLangType.zh_CN; } this.wxMpService.execute(VoiceUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(VOICE_UPLOAD_URL, "mp3", voiceId, lang.getCode()), voiceFile); } 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 void uploadVoice(String voiceId, AiLangType lang, File voiceFile) throws WxErrorException { if (lang == null) { lang = AiLangType.zh_CN; } this.wxMpService.execute(VoiceUploadRequestExecutor.create(this.wxMpService.getRequestHttp()), String.format(VOICE_UPLOAD_URL, "mp3", voiceId, lang.getCode()), voiceFile); } 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; }