# Translation-Voice
**Repository Path**: kyoto/Translation-Voice
## Basic Information
- **Project Name**: Translation-Voice
- **Description**: 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/
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-10-31
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#### Software interface display
||||
|:--:|:--:|:--:|
|百度翻译界面(十八种语言)|侧滑栏界面|侧滑栏的生词本|
||

|
|
|主界面翻译过的组可进行收藏跟删除|科大讯飞语音识别跟界面|科大讯飞语音合成界面|
| |
|
|
#### Dependence
```java
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/Msc.jar')
implementation files('libs/gson-2.8.1.jar')
```
#### [Ustc iflytek open platform for voice](http://www.xfyun.cn/)
MyApplication.java
```java
SpeechUtility.createUtility(this, SpeechConstant.APPID + "=5ad97691");
RecognitionManager.getSingleton().init(this,"5ad97691");
SynthesisManager.getSingleton().init(this,"5ad97691");
```
#### [Baidu translation open platform](https://fanyi-api.baidu.com/api/trans/product/index)
IDActivity.class
```java
String appid = "你应用的AppID"
String pw = "对应的password"
File dir = getApplicationContext().getFilesDir();//查找这个应用下的所有文件所在的目录
Log.d("文件夹:" , dir.getAbsolutePath());
FileWriter writer;
try {
writer = new FileWriter(dir.getAbsolutePath() + "/userinfo.txt");
writer.append(appid+","+pw+","+choose);
writer.close();
ToastUtil.showToast(IDActivity.this,"设置成功");
} catch (IOException e) {
e.printStackTrace();
}
```
#### LICENSE
```java
Copyright 2018 wanghao15536870732
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```