Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
02537195
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 1 年 前同步成功
通知
207
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
02537195
编写于
6月 14, 2021
作者:
H
Hui Zhang
提交者:
GitHub
6月 14, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #668 from PaddlePaddle/feat
audio feature
上级
1cd88d26
b08384cd
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1222 addition
and
12 deletion
+1222
-12
.notebook/audio_feature.ipynb
.notebook/audio_feature.ipynb
+1207
-0
third_party/nnAudio/.gitignore
third_party/nnAudio/.gitignore
+3
-0
third_party/nnAudio/nnAudio/Spectrogram.py
third_party/nnAudio/nnAudio/Spectrogram.py
+7
-4
third_party/nnAudio/setup.py
third_party/nnAudio/setup.py
+5
-8
未找到文件。
.notebook/audio_feature.ipynb
0 → 100644
浏览文件 @
02537195
此差异已折叠。
点击以展开。
third_party/nnAudio/.gitignore
0 → 100644
浏览文件 @
02537195
build
dist
*.egg-info/
third_party/nnAudio/nnAudio/Spectrogram.py
浏览文件 @
02537195
...
...
@@ -165,9 +165,13 @@ class STFT(torch.nn.Module):
# self.kernel_cos = torch.nn.Parameter(self.kernel_cos, requires_grad=self.trainable)
# Applying window functions to the Fourier kernels
window_mask
=
torch
.
tensor
(
window_mask
)
wsin
=
kernel_sin
*
window_mask
wcos
=
kernel_cos
*
window_mask
if
window
:
window_mask
=
torch
.
tensor
(
window_mask
)
wsin
=
kernel_sin
*
window_mask
wcos
=
kernel_cos
*
window_mask
else
:
wsin
=
kernel_sin
wcos
=
kernel_cos
if
self
.
trainable
==
False
:
self
.
register_buffer
(
'wsin'
,
wsin
)
...
...
@@ -179,7 +183,6 @@ class STFT(torch.nn.Module):
self
.
register_parameter
(
'wsin'
,
wsin
)
self
.
register_parameter
(
'wcos'
,
wcos
)
# Prepare the shape of window mask so that it can be used later in inverse
self
.
register_buffer
(
'window_mask'
,
window_mask
.
unsqueeze
(
0
).
unsqueeze
(
-
1
))
...
...
third_party/nnAudio/setup.py
浏览文件 @
02537195
...
...
@@ -2,29 +2,26 @@ import setuptools
import
codecs
import
os.path
with
open
(
"README.md"
,
"r"
)
as
fh
:
long_description
=
fh
.
read
()
def
read
(
rel_path
):
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
with
codecs
.
open
(
os
.
path
.
join
(
here
,
rel_path
),
'r'
)
as
fp
:
return
fp
.
read
()
return
fp
.
read
()
def
get_version
(
rel_path
):
for
line
in
read
(
rel_path
).
splitlines
():
if
line
.
startswith
(
'__version__'
):
delim
=
'"'
if
'"'
in
line
else
"'"
return
line
.
split
(
delim
)[
1
]
else
:
raise
RuntimeError
(
"Unable to find version string."
)
raise
RuntimeError
(
"Unable to find version string."
)
setuptools
.
setup
(
name
=
"nnAudio"
,
# Replace with your own username
version
=
get_version
(
"nnAudio/__init__.py"
),
author
=
"KinWaiCheuk"
,
author_email
=
"u3500684@connect.hku.hk"
,
description
=
"A fast GPU audio processing toolbox with 1D convolutional neural network"
,
long_description
=
long_description
,
long_description
=
''
,
long_description_content_type
=
"text/markdown"
,
url
=
"https://github.com/KinWaiCheuk/nnAudio"
,
packages
=
setuptools
.
find_packages
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录