Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
da6692c7
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
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看板
未验证
提交
da6692c7
编写于
6月 29, 2022
作者:
H
Hui Zhang
提交者:
GitHub
6月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2102 from zh794390558/format
[audio] format and cpplint
上级
3dcf9235
f42c0ccc
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
35 addition
and
19 deletion
+35
-19
.pre-commit-hooks/cpplint.hook
.pre-commit-hooks/cpplint.hook
+1
-1
paddlespeech/audio/_internal/module_utils.py
paddlespeech/audio/_internal/module_utils.py
+4
-0
paddlespeech/audio/src/pybind/kaldi/feature_common_inl.h
paddlespeech/audio/src/pybind/kaldi/feature_common_inl.h
+8
-8
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.cc
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.cc
+4
-3
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h
+3
-2
paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h
paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h
+2
-2
paddlespeech/audio/src/pybind/pybind.cpp
paddlespeech/audio/src/pybind/pybind.cpp
+2
-2
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
+9
-0
tools/setup_helpers/extension.py
tools/setup_helpers/extension.py
+2
-1
未找到文件。
.pre-commit-hooks/cpplint.hook
浏览文件 @
da6692c7
...
@@ -45,7 +45,7 @@ exec 1>&2
...
@@ -45,7 +45,7 @@ exec 1>&2
cpplint
=
cpplint
cpplint
=
cpplint
sum
=
0
sum
=
0
filters
=
'-build/include_order,-build/namespaces,-legal/copyright,-runtime/references,-build/include_what_you_use'
filters
=
'-build/include_order,-build/namespaces,-legal/copyright,-runtime/references,-build/include_what_you_use
,-whitespace/indent,-build/header_guard
'
# for cpp
# for cpp
for
file
in
$(
git diff-index
--name-status
$against
--
|
grep
-E
'\.[ch](pp)?$'
|
awk
'{print $2}'
)
;
do
for
file
in
$(
git diff-index
--name-status
$against
--
|
grep
-E
'\.[ch](pp)?$'
|
awk
'{print $2}'
)
;
do
...
...
paddlespeech/audio/_internal/module_utils.py
浏览文件 @
da6692c7
...
@@ -108,9 +108,11 @@ def is_soundfile_available():
...
@@ -108,9 +108,11 @@ def is_soundfile_available():
def
requires_soundfile
():
def
requires_soundfile
():
if
is_soundfile_available
():
if
is_soundfile_available
():
def
decorator
(
func
):
def
decorator
(
func
):
return
func
return
func
else
:
else
:
def
decorator
(
func
):
def
decorator
(
func
):
@
wraps
(
func
)
@
wraps
(
func
)
def
wrapped
(
*
args
,
**
kwargs
):
def
wrapped
(
*
args
,
**
kwargs
):
...
@@ -128,9 +130,11 @@ def is_sox_available():
...
@@ -128,9 +130,11 @@ def is_sox_available():
def
requires_sox
():
def
requires_sox
():
if
is_sox_available
():
if
is_sox_available
():
def
decorator
(
func
):
def
decorator
(
func
):
return
func
return
func
else
:
else
:
def
decorator
(
func
):
def
decorator
(
func
):
@
wraps
(
func
)
@
wraps
(
func
)
def
wrapped
(
*
args
,
**
kwargs
):
def
wrapped
(
*
args
,
**
kwargs
):
...
...
paddlespeech/audio/src/pybind/kaldi/feature_common_inl.h
浏览文件 @
da6692c7
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.cc
浏览文件 @
da6692c7
...
@@ -77,7 +77,8 @@ bool InitFbank(float samp_freq, // frame opts
...
@@ -77,7 +77,8 @@ bool InitFbank(float samp_freq, // frame opts
}
}
py
::
array_t
<
double
>
ComputeFbankStreaming
(
const
py
::
array_t
<
double
>&
wav
)
{
py
::
array_t
<
double
>
ComputeFbankStreaming
(
const
py
::
array_t
<
double
>&
wav
)
{
return
paddleaudio
::
kaldi
::
KaldiFeatureWrapper
::
GetInstance
()
->
ComputeFbank
(
wav
);
return
paddleaudio
::
kaldi
::
KaldiFeatureWrapper
::
GetInstance
()
->
ComputeFbank
(
wav
);
}
}
py
::
array_t
<
double
>
ComputeFbank
(
py
::
array_t
<
double
>
ComputeFbank
(
...
@@ -144,5 +145,5 @@ void ResetFbank() {
...
@@ -144,5 +145,5 @@ void ResetFbank() {
paddleaudio
::
kaldi
::
KaldiFeatureWrapper
::
GetInstance
()
->
ResetFbank
();
paddleaudio
::
kaldi
::
KaldiFeatureWrapper
::
GetInstance
()
->
ResetFbank
();
}
}
}
//
kaldi
}
// namespace
kaldi
}
//
paddleaudio
}
// namespace
paddleaudio
paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h
浏览文件 @
da6692c7
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include <pybind11/numpy.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/pybind11.h>
#include <string>
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h"
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h"
...
...
paddlespeech/audio/src/pybind/kaldi/kaldi_feature_wrapper.h
浏览文件 @
da6692c7
paddlespeech/audio/src/pybind/pybind.cpp
浏览文件 @
da6692c7
// Copyright (c) 2017 Facebook Inc. (Soumith Chintala), All rights reserved.
// Copyright (c) 2017 Facebook Inc. (Soumith Chintala), All rights reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#include "paddlespeech/audio/src/pybind/sox/io.h"
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h"
#include "paddlespeech/audio/src/pybind/kaldi/kaldi_feature.h"
#include "paddlespeech/audio/src/pybind/sox/io.h"
// Sox
// Sox
PYBIND11_MODULE
(
_paddleaudio
,
m
)
{
PYBIND11_MODULE
(
_paddleaudio
,
m
)
{
...
...
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
浏览文件 @
da6692c7
...
@@ -499,6 +499,15 @@ class SymbolicShapeInference:
...
@@ -499,6 +499,15 @@ class SymbolicShapeInference:
'Attention'
,
'BiasGelu'
,
\
'Attention'
,
'BiasGelu'
,
\
'EmbedLayerNormalization'
,
\
'EmbedLayerNormalization'
,
\
'FastGelu'
,
'Gelu'
,
'LayerNormalization'
,
\
'FastGelu'
,
'Gelu'
,
'LayerNormalization'
,
\
...
...
tools/setup_helpers/extension.py
浏览文件 @
da6692c7
...
@@ -35,7 +35,8 @@ def _get_build(var, default=False):
...
@@ -35,7 +35,8 @@ def _get_build(var, default=False):
_BUILD_SOX
=
False
if
platform
.
system
()
==
"Windows"
else
_get_build
(
_BUILD_SOX
=
False
if
platform
.
system
()
==
"Windows"
else
_get_build
(
"BUILD_SOX"
,
True
)
"BUILD_SOX"
,
True
)
_BUILD_MAD
=
_get_build
(
"BUILD_MAD"
,
False
)
_BUILD_MAD
=
_get_build
(
"BUILD_MAD"
,
False
)
_BUILD_KALDI
=
False
if
platform
.
system
()
==
"Windows"
else
_get_build
(
"BUILD_KALDI"
,
True
)
_BUILD_KALDI
=
False
if
platform
.
system
()
==
"Windows"
else
_get_build
(
"BUILD_KALDI"
,
True
)
# _BUILD_RNNT = _get_build("BUILD_RNNT", True)
# _BUILD_RNNT = _get_build("BUILD_RNNT", True)
# _BUILD_CTC_DECODER = False if platform.system() == "Windows" else _get_build("BUILD_CTC_DECODER", True)
# _BUILD_CTC_DECODER = False if platform.system() == "Windows" else _get_build("BUILD_CTC_DECODER", True)
# _USE_FFMPEG = _get_build("USE_FFMPEG", False)
# _USE_FFMPEG = _get_build("USE_FFMPEG", False)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录