-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7efbcfa
commit 107b13a
Showing
14 changed files
with
327 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# audio_emotion | ||
闻声知乐 | ||
# 闻声知乐 | ||
|
||
## 1. 项目架构 | ||
### 1.1 数据与模型训练 | ||
使用了CASIA情感语音数据集,pytorch搭建深度学习模型进行训练。 | ||
- extract_features.py:封装了提取音频特征的方法。 | ||
- transforms.py:提取出的特征输入模型前进行的变换。 | ||
- dataset.py:构建数据集的方法和类。 | ||
- augmentation.py:对数据增强的一些方法。 | ||
- models.ipynb:训练、保存模型。模型存放在pickles目录下。 | ||
|
||
### 1.2 系统 | ||
本系统采用前后端分离SPA(单页面应用)模式,位于app文件夹中: | ||
- 前端:使用vue.js,实现了接受音频上传的组件,并将音频流向后端发送。 | ||
- 后端:使用python+flask,部署模型,接受来自前端的音频流进行预测。 | ||
|
||
前后端分别位于app/frontend和app/backend中。 | ||
|
||
后端主要代码实现在app/app.py中。 | ||
|
||
## 2. 课程知识的体现 | ||
- 面向对象设计:对于数据集类、变换类的封装。 | ||
- 并行与并发:读取数据集时,使用多线程并发,cpu负载达到100%,大约节省100s时间。 | ||
- etc…… | ||
|
||
## 3. Some Details | ||
- tutorials文件夹:里面记录了我的一些学习过程,还有相关资料。 | ||
- 略有遗憾的地方:前端经验不够丰富,没有想到颜值比较高的方法来渲染预测结果。。。 | ||
- **原创性声明:除了某些前端组件,其余均为自己实现。** |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<title>frontend</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<title>语音情感分类系统</title> | ||
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css"> | ||
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> | ||
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> | ||
<style> | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-default" role="navigation"> | ||
<div class="container-fluid"> | ||
<div class="navbar-header"> | ||
<a class="navbar-brand" href="https://github.com/DallasAutumn/audio_emotion">项目地址</a> | ||
</div> | ||
<div> | ||
<ul class="nav navbar-nav"> | ||
<li class="active"><a href="http://zhaojichang.cn">团队主页</a></li> | ||
<li><a href="/">机器学习——从入门到转前端开发</a></li> | ||
<li class="dropdown"> | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> | ||
参考资料 | ||
<b class="caret"></b> | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a href="https://pytorch.org">pytorch docs</a></li> | ||
<li><a href="https://towardsdatascience.com/">Towards Data Science</a></li> | ||
<li><a href="https://github.com/Di-Weng">翁迪</a></li> | ||
<!-- <li class="divider"></li> | ||
<li><a href="#">分离的链接</a></li> | ||
<li class="divider"></li> | ||
<li><a href="#">另一个分离的链接</a></li> --> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
<div id="app"> | ||
<img src="./src/assets/img/logo.png"> | ||
<router-view /> | ||
</div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
|
||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
html, body{ | ||
margin: 0 | ||
padding: 0 | ||
width: 100% | ||
height: 100% | ||
} | ||
|
||
body{ | ||
background-image: url(https://www.4ui.cn/uploads/bing/2017/06/18/thumb_1366x768_6dafe7993436870b21004fe38a763e14.jpg) | ||
background-size: cover | ||
background-position: center | ||
font: 14px/1.5 tahoma,arial,'Hiragino Sans GB','\5b8b\4f53',sans-serif | ||
color: #4d4d4d | ||
-webkit-font-smoothing: antialiased // 这个属性可以使页面上的字体抗锯齿,使用后字体看起来会更清晰舒服 | ||
font-weight: 300 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.