项目作者: wanghao15536870732

项目描述 :
🔥 A translation app integrating baidu translation (supporting multiple languages) with the speech synthesis of "Iflytek Co.Ltd". This is Iflytek Co.Ltd 's official website: http://www.xfyun.cn/
高级语言: Java
项目地址: git://github.com/wanghao15536870732/Translation-Voice.git
创建时间: 2018-06-09T09:34:07Z
项目社区:https://github.com/wanghao15536870732/Translation-Voice

开源协议:Apache License 2.0

下载





Translation-Voice



#### Support multiple languages spoken translation app


Click to Download




#### Feature



























功能名称 功能描述
翻译功能 用户只需安装好app,并且在保持网络良好的情况下,即可进行十八种语言的相互翻译
生词本功能 1) 用户在进行语言的翻译后,就会出现一个对应的翻译item,用户通过点击星星即可进行收藏,之后可以在侧滑栏当中的生词本进行查看
语音识别功能 用户通过点击该功能,可以将不标准的语言转换成普通话,进行播放,只是暂时只支持汉语跟英语
语音合成 用户通过点击该功能,可以将翻译界面翻译好的词,进行语音播放,暂时只支持汉语跟英语
语音转文字 用户通过点击该功能,可以将语音转为文字,暂时也是只支持英语跟汉语







#### Software interface display
||||
|:—:|:—:|:—:|
|百度翻译界面(十八种语言)|侧滑栏界面|侧滑栏的生词本|
|Screenshot_20180805-170422.png|
|
|
|主界面翻译过的组可进行收藏跟删除|科大讯飞语音识别跟界面|科大讯飞语音合成界面|
|Screenshot_20180805-170415.png |
|
|

Dependence

  1. implementation fileTree(dir: 'libs', include: ['*.jar'])
  2. implementation 'com.android.support:appcompat-v7:26.1.0'
  3. implementation 'com.android.support.constraint:constraint-layout:1.1.0'
  4. implementation 'com.android.support:design:26.1.0'
  5. testImplementation 'junit:junit:4.12'
  6. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  7. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  8. implementation files('libs/Msc.jar')
  9. implementation files('libs/gson-2.8.1.jar')

Ustc iflytek open platform for voice

MyApplication.java

  1. SpeechUtility.createUtility(this, SpeechConstant.APPID + "=5ad97691");
  2. RecognitionManager.getSingleton().init(this,"5ad97691");
  3. SynthesisManager.getSingleton().init(this,"5ad97691");

Baidu translation open platform

IDActivity.class

  1. String appid = "你应用的AppID"
  2. String pw = "对应的password"
  3. File dir = getApplicationContext().getFilesDir();//查找这个应用下的所有文件所在的目录
  4. Log.d("文件夹:" , dir.getAbsolutePath());
  5. FileWriter writer;
  6. try {
  7. writer = new FileWriter(dir.getAbsolutePath() + "/userinfo.txt");
  8. writer.append(appid+","+pw+","+choose);
  9. writer.close();
  10. ToastUtil.showToast(IDActivity.this,"设置成功");
  11. } catch (IOException e) {
  12. e.printStackTrace();
  13. }

LICENSE

  1. Copyright 2018 wanghao15536870732
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.