Android个人语音app设计报告.docx

上传人:b****6 文档编号:5126796 上传时间:2022-12-13 格式:DOCX 页数:32 大小:85.93KB
下载 相关 举报
Android个人语音app设计报告.docx_第1页
第1页 / 共32页
Android个人语音app设计报告.docx_第2页
第2页 / 共32页
Android个人语音app设计报告.docx_第3页
第3页 / 共32页
Android个人语音app设计报告.docx_第4页
第4页 / 共32页
Android个人语音app设计报告.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

Android个人语音app设计报告.docx

《Android个人语音app设计报告.docx》由会员分享,可在线阅读,更多相关《Android个人语音app设计报告.docx(32页珍藏版)》请在冰豆网上搜索。

Android个人语音app设计报告.docx

Android个人语音app设计报告

 

一、设计背景

随着移动通信与Internet向移动终端的普及,网络和用户对移动终端的要求越来越高Windowsmobi1e,Palm0s等手机平台过于封闭,不能很好的满足用户的需求,因此市场迫切需要一个开发性很强的平台。

经过多年的发展,第四代数字通信(4G)技术活动了广泛的接受,它为移动终端用户带来了更快的数据传输速率。

随着4G网络的使用,移动终端不再仅是通讯网络的终端,还将成为互联网的终端。

因此,移动终端的应用软件和需要的服务将会有很大的发展空间。

Goog1e为此于2007年11月推出了一个专为移动设备设计的软件平台---Android是一套真正意义上的开发性的移动设备综合平台,它包括操作系统、中间件和些关键的平台应用。

Android是由Linux+Java构成的开源软件,允许所有厂商和个人在其基础上进行开发。

Android平台的开放性等特点既能促进技术(包括斗平台本身)的创新又有助于降低开发成本,还可以是运营商能非常方便地制定自己的特色化的产品。

因此,它具有很大的市场发展潜力。

二、需求分析

如今,伴随着Goog1eAndroid操作系统的盛行,基于AndroidsDK的系统开发和基于Android应用的开发等已倍受大家关注。

Android应用面向的是普通个体用户,这些用户往往会更加关注用户体验,因此Android应用增加多媒体功能十分必要。

就目前的手机发展趋势来看,手机已经不再是单一的通讯工具,更多的手机用户希望在工作、学习之余通过方便灵巧可随身携带的仪器休闲娱乐。

而且近年来,由于人们生活水平的提高,越来越多的人开始关注聊天交互,尤其是不会打字的人。

因此为了迎合众多用户的需求并适应现在的手机的规模,我设计了一个语音识别应用程序。

三、设计名称

虎宝语音

四、设计目的

本设计是在学习Android平台软件开发的课程的基础上进行的一次综合实践。

通过本课程设计,让学生们巩固下有关Android平台软件开发的知识,也考查学生们的学习情况。

同时为方便与家人的语音交互聊天,让聊天更便捷。

五、设计原理及工具

1.设计原理

在安卓工程中,引入第三方SDK,集成到项目中,实现功能。

2.使用工具

1)AndroidStudio开发工具

AndroidStudio是一个Android集成开发工具,基于IntelliJIDEA.类似EclipseADT,AndroidStudio提供了集成的Android开发工具用于开发和调试。

在IDEA的基础上,AndroidStudio提供:

a)基于Gradle的构建支持Android专属的重构和快速修复

b)提示工具以捕获性能、可用性、版本兼容性等问题

c)支持ProGuard和应用签名基于模板的向导来生成常用的Android应用设计和组件

d)功能强大的布局编辑器,可以让你拖拉UI控件并进行效果预览

2)Mob短信验证SDK

短信验证码SDK,为开发者提供全球通用的短信验证码工具,开发者可以用其在App植入短信验证码SDK、简单设置即可短信验证,集成快速便捷,且后期易于管理。

3)讯飞语音听写SDK

语音听写,主要是将连续的语音快速识别为文字的过程。

这是一个非常有用的接口,它让机器人实现了听懂人的话。

而,更加人性化的是,开发者可以针对某一个应用,根据特定场景下的用词,按照格式上传一些高频的词语,让科大的分析引擎通过机器学习,从而对这些词语有着更高的识别率。

而且,科大官方也提出了几个听写的模型,通俗理解就是一些场景,针对这些场景,某些词语的识别率更高。

六、设计步骤及结果

1.在工程中集成第三方SDK,短信验证SDK和讯飞听写SDK。

1)在工程build.gradle,加入代码:

//添加MobSDK的maven地址

maven{

url"

}

//注册MobSDK

classpath'com.mob.sdk:

MobSDK:

+'

2)在个人build.gradle,加入代码:

applyplugin:

'com.mob.sdk'

//在MobSDK的扩展中注册SMSSDK的相关信息

MobSDK{

appKey"265d096d83eb9"

appSecret"32b1e7b67e2a3a9c894ff66ce38d87fa"

SMSSDK{}

}

2.布局文件编写

1)创建项目dhy203grapp01。

2)修改主Activity的布局文件denglu_jm.xml,

编写代码如下:

xmlversion="1.0"encoding="utf-8"?

>

xmlns:

android="

android:

layout_width="match_parent"

android:

layout_height="match_parent"

android:

orientation="vertical">

xmlns:

android="

xmlns:

tools="

xmlns:

app="

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

orientation="vertical"

app:

left_tv_visible="false"

app:

left_tv_text="返回"

app:

right_btn_visible="false"

app:

right_btn_src="@mipmap/ic_launcher"

app:

title_visible="true"

app:

title_text="用户登录"

tools:

context="com.example.dhy203grapp01.MainActivity">

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

src="@mipmap/huhu"

android:

layout_marginTop="86dp"

android:

layout_gravity="center"

/>

android:

layout_width="280dp"

android:

layout_height="wrap_content"

android:

orientation="horizontal"

android:

layout_gravity="center"

android:

layout_marginTop="40dp">

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="手机号:

"

android:

textSize="18sp"/>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

id="@+id/et_phonenum"

android:

hint="请输入手机号"

android:

inputType="phone"

/>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

id="@+id/btn_check"

android:

text="获取验证码"

android:

layout_gravity="center"

android:

background="#1296db"

android:

textColor="#ffffff"

android:

textSize="18sp"/>

android:

layout_width="280dp"

android:

layout_height="wrap_content"

android:

orientation="horizontal"

android:

layout_gravity="center"

android:

layout_marginTop="20dp">

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="验证码:

"

android:

textSize="18sp"/>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

id="@+id/et_checkecode"

android:

hint="请输入验证码"

android:

inputType="phone"

/>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

id="@+id/btn_sure"

android:

text="验证"

android:

layout_gravity="center"

android:

background="#1296db"

android:

textColor="#ffffff"

android:

textSize="18sp"/>

android:

layout_width="200dp"

android:

layout_height="wrap_content"

android:

id="@+id/btn_dl"

android:

text="登录"

android:

layout_marginTop="26dp"

android:

layout_gravity="center"

android:

background="#1296db"

android:

textColor="#ffffff"

android:

textSize="18sp"/>

android:

layout_width="match_parent"

android:

layout_height="match_parent"

android:

id="@+id/bj01"

>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="注册账号"

android:

layout_alignParentLeft="true"

android:

textSize="18sp"

android:

layout_centerVertical="true"

android:

layout_marginLeft="20dp"

android:

textColor="#1296db"/>

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="忘记密码"

android:

layout_alignParentRight="true"

android:

textSize="18sp"

android:

layout_centerVertical="true"

android:

layout_marginRight="20dp"

android:

textColor="#1296db"/>

3)在loyout文件夹下,创建activity_main.xml,编写代码如下:

xmlversion="1.0"encoding="utf-8"?

>

xmlns:

android="

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

orientation="vertical">

xmlns:

android="

xmlns:

tools="

xmlns:

app="

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

orientation="vertical"

app:

left_tv_visible="false"

app:

left_tv_text="返回"

app:

right_btn_visible="false"

app:

right_btn_src="@mipmap/ic_launcher"

app:

title_visible="true"

app:

title_text="语音输入"

tools:

context="com.example.dhy203grapp01.MainActivity">

android:

layout_width="280dp"

android:

layout_height="wrap_content"

android:

orientation="horizontal"

android:

layout_gravity="center"

android:

layout_marginTop="40dp">

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="您想要说的:

"

android:

textSize="28sp"/>

android:

id="@+id/tv"

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

background="#55cccccc"

android:

textSize="28sp"/>

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

orientation="vertical">

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

layout_weight="1"

android:

onClick="start"

android:

text="开始听写"/>

android:

layout_width="match_parent"

android:

layout_height="wrap_content"

android:

layout_weight="1"

android:

onClick="stop"

android:

text="停止听写"/>

4)标题栏布局文件,创建layout_common_toolbar.xml文件,代码如下:

xmlversion="1.0"encoding="utf-8"?

>

android="

android:

orientation="vertical"

android:

layout_width="match_parent"

android:

layout_height="match_parent">

android:

id="@+id/toolbar_content_rlyt"

android:

layout_width="match_parent"

android:

layout_height="58dp"

android:

paddingLeft="15dp"

android:

paddingRight="15dp"

android:

background="@color/bg_toolbar">

android:

id="@+id/toolbar_left_btn"

android:

layout_width="25dp"

android:

layout_height="25dp"

android:

layout_alignParentLeft="true"

android:

padding="50dp"

android:

gravity="center"

android:

layout_centerVertical="true"

android:

background="@mipmap/ic_launcher"

android:

visibility="invisible"/>

android:

id="@+id/toolbar_left_tv"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

layout_alignParentLeft="true"

android:

gravity="center"

android:

layout_centerVertical="true"

android:

textColor="#fff"

android:

textSize="15sp"

android:

text="返回"

android:

visibility="gone"

/>

android:

id="@+id/toolbar_title_tv"

android:

layout_width="wrap_content"

android:

layout_height="match_parent"

android:

gravity="center"

android:

layout_centerInParent="true"

android:

singleLine="true"

android:

text="标题"

android:

textSize="20sp"

android:

textColor="#fff"

android:

maxEms="10"

android:

visibility="invisible"/>

android:

id="@+id/toolbar_right_btn"

android:

layout_width="25dp"

android:

layout_height="25dp"

android:

layout_alignParentRight="true"

android:

gravity="center"

android:

layout_centerVertical="true"

android:

visibility="invisible"

android:

background="#00000000"

android:

textSize="15sp"

android:

textColor="#fff"/>

android:

id="@+id/toolbar_right_tv"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

layout_alignParentRight="true"

android:

gravity="center"

android:

layout_centerVertical="true"

android:

textColor="#fff"

android:

textSize="15sp"

android:

text="更多"

android:

visibility="gone"/>

3.配置文件,加载第三方SDK,mob短信验证SDK和讯飞语音SDK。

1)在values文件夹下,创建attrs.xml,编写代码如下:

xmlversion="1.0"encoding="utf-8"?

>

--标题栏样式-->

--左按钮是否可见|背景-->

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 法学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1