Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
4051e7b7
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看板
提交
4051e7b7
编写于
3月 23, 2022
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compliance test bug, and format
上级
fc1bee35
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
33 addition
and
47 deletion
+33
-47
.gitignore
.gitignore
+3
-1
demos/audio_searching/requirements.txt
demos/audio_searching/requirements.txt
+6
-7
demos/audio_searching/src/config.py
demos/audio_searching/src/config.py
+0
-1
demos/audio_searching/src/logs.py
demos/audio_searching/src/logs.py
+1
-2
demos/audio_searching/src/operations/load.py
demos/audio_searching/src/operations/load.py
+2
-3
examples/ami/sd0/local/ami_prepare.py
examples/ami/sd0/local/ami_prepare.py
+0
-1
paddleaudio/.gitignore
paddleaudio/.gitignore
+2
-0
paddleaudio/docs/README.md
paddleaudio/docs/README.md
+1
-1
paddleaudio/docs/source/conf.py
paddleaudio/docs/source/conf.py
+6
-21
paddleaudio/paddleaudio/compliance/__init__.py
paddleaudio/paddleaudio/compliance/__init__.py
+2
-0
paddleaudio/paddleaudio/metric/mcd.py
paddleaudio/paddleaudio/metric/mcd.py
+3
-1
paddlespeech/t2s/frontend/zh_normalization/chronology.py
paddlespeech/t2s/frontend/zh_normalization/chronology.py
+2
-2
paddlespeech/vector/cluster/diarization.py
paddlespeech/vector/cluster/diarization.py
+5
-7
未找到文件。
.gitignore
浏览文件 @
4051e7b7
...
@@ -34,4 +34,6 @@ tools/activate_python.sh
...
@@ -34,4 +34,6 @@ tools/activate_python.sh
tools/miniconda.sh
tools/miniconda.sh
tools/CRF++-0.58/
tools/CRF++-0.58/
speechx/fc_patch/
speechx/fc_patch/
\ No newline at end of file
third_party/ctc_decoders/paddlespeech_ctcdecoders.py
demos/audio_searching/requirements.txt
浏览文件 @
4051e7b7
soundfile==0.10.3.post1
diskcache==5.2.1
fastapi
librosa==0.8.0
librosa==0.8.0
numpy
numpy
pydanticpymilvus==2.0.1
pymysql
pymysql
fastapi
uvicorn
diskcache==5.2.1
pymilvus==2.0.1
python-multipart
python-multipart
typing
soundfile==0.10.3.post1
starlette
starlette
pydantic
typing
\ No newline at end of file
uvicorn
demos/audio_searching/src/config.py
浏览文件 @
4051e7b7
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
os
############### Milvus Configuration ###############
############### Milvus Configuration ###############
...
...
demos/audio_searching/src/logs.py
浏览文件 @
4051e7b7
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
codecs
import
datetime
import
datetime
import
logging
import
logging
import
os
import
os
...
@@ -124,7 +123,7 @@ class MultiprocessHandler(logging.FileHandler):
...
@@ -124,7 +123,7 @@ class MultiprocessHandler(logging.FileHandler):
logging
.
FileHandler
.
emit
(
self
,
record
)
logging
.
FileHandler
.
emit
(
self
,
record
)
except
(
KeyboardInterrupt
,
SystemExit
):
except
(
KeyboardInterrupt
,
SystemExit
):
raise
raise
except
:
except
Exception
as
e
:
self
.
handleError
(
record
)
self
.
handleError
(
record
)
...
...
demos/audio_searching/src/operations/load.py
浏览文件 @
4051e7b7
...
@@ -26,9 +26,8 @@ def get_audios(path):
...
@@ -26,9 +26,8 @@ def get_audios(path):
"""
"""
supported_formats
=
[
".wav"
,
".mp3"
,
".ogg"
,
".flac"
,
".m4a"
]
supported_formats
=
[
".wav"
,
".mp3"
,
".ogg"
,
".flac"
,
".m4a"
]
return
[
return
[
item
item
for
sublist
in
[[
os
.
path
.
join
(
dir
,
file
)
for
file
in
files
]
for
sublist
in
[[
os
.
path
.
join
(
dir
,
file
)
for
file
in
files
]
for
dir
,
_
,
files
in
list
(
os
.
walk
(
path
))]
for
dir
,
_
,
files
in
list
(
os
.
walk
(
path
))]
for
item
in
sublist
if
os
.
path
.
splitext
(
item
)[
1
]
in
supported_formats
for
item
in
sublist
if
os
.
path
.
splitext
(
item
)[
1
]
in
supported_formats
]
]
...
...
examples/ami/sd0/local/ami_prepare.py
浏览文件 @
4051e7b7
...
@@ -18,7 +18,6 @@ Download: http://groups.inf.ed.ac.uk/ami/download/
...
@@ -18,7 +18,6 @@ Download: http://groups.inf.ed.ac.uk/ami/download/
Prepares metadata files (JSON) from manual annotations "segments/" using RTTM format (Oracle VAD).
Prepares metadata files (JSON) from manual annotations "segments/" using RTTM format (Oracle VAD).
"""
"""
import
argparse
import
argparse
import
glob
import
glob
import
json
import
json
...
...
paddleaudio/.gitignore
0 → 100644
浏览文件 @
4051e7b7
.eggs
*.wav
paddleaudio/docs/README.md
浏览文件 @
4051e7b7
...
@@ -15,4 +15,4 @@ Exclude `paddleaudio.utils`
...
@@ -15,4 +15,4 @@ Exclude `paddleaudio.utils`
## 3. Build
## 3. Build
`sphinx-build source _html`
`sphinx-build source _html`
\ No newline at end of file
paddleaudio/docs/source/conf.py
浏览文件 @
4051e7b7
...
@@ -5,18 +5,14 @@
...
@@ -5,18 +5,14 @@
# This file does only contain a selection of the most common options. For a
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# documentation root, use os.path.abspath to make it absolute, like shown here.
import
os
import
os
import
sys
import
sys
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'../..'
))
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'../..'
))
# -- Project information -----------------------------------------------------
# -- Project information -----------------------------------------------------
project
=
'PaddleAudio'
project
=
'PaddleAudio'
...
@@ -28,7 +24,6 @@ version = ''
...
@@ -28,7 +24,6 @@ version = ''
# The full version, including alpha/beta/rc tags
# The full version, including alpha/beta/rc tags
release
=
'0.2.0'
release
=
'0.2.0'
# -- General configuration ---------------------------------------------------
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# If your documentation needs a minimal Sphinx version, state it here.
...
@@ -75,7 +70,6 @@ exclude_patterns = []
...
@@ -75,7 +70,6 @@ exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
None
pygments_style
=
None
# -- Options for HTML output -------------------------------------------------
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# The theme to use for HTML and HTML Help pages. See the documentation for
...
@@ -112,13 +106,11 @@ html_css_files = [
...
@@ -112,13 +106,11 @@ html_css_files = [
#
#
# html_sidebars = {}
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
# Output file base name for HTML help builder.
htmlhelp_basename
=
'PaddleAudiodoc'
htmlhelp_basename
=
'PaddleAudiodoc'
# -- Options for LaTeX output ------------------------------------------------
# -- Options for LaTeX output ------------------------------------------------
latex_elements
=
{
latex_elements
=
{
...
@@ -143,20 +135,16 @@ latex_elements = {
...
@@ -143,20 +135,16 @@ latex_elements = {
# (source start file, target name, title,
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# author, documentclass [howto, manual, or own class]).
latex_documents
=
[
latex_documents
=
[
(
master_doc
,
'PaddleAudio.tex'
,
'PaddleAudio Documentation'
,
(
master_doc
,
'PaddleAudio.tex'
,
'PaddleAudio Documentation'
,
'PaddlePaddle'
,
'
PaddlePaddle'
,
'
manual'
),
'manual'
),
]
]
# -- Options for manual page output ------------------------------------------
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
# (source start file, name, description, authors, manual section).
man_pages
=
[
man_pages
=
[(
master_doc
,
'paddleaudio'
,
'PaddleAudio Documentation'
,
[
author
],
(
master_doc
,
'paddleaudio'
,
'PaddleAudio Documentation'
,
1
)]
[
author
],
1
)
]
# -- Options for Texinfo output ----------------------------------------------
# -- Options for Texinfo output ----------------------------------------------
...
@@ -164,12 +152,10 @@ man_pages = [
...
@@ -164,12 +152,10 @@ man_pages = [
# (source start file, target name, title, author,
# (source start file, target name, title, author,
# dir menu entry, description, category)
# dir menu entry, description, category)
texinfo_documents
=
[
texinfo_documents
=
[
(
master_doc
,
'PaddleAudio'
,
'PaddleAudio Documentation'
,
(
master_doc
,
'PaddleAudio'
,
'PaddleAudio Documentation'
,
author
,
author
,
'PaddleAudio'
,
'One line description of project.'
,
'PaddleAudio'
,
'One line description of project.'
,
'Miscellaneous'
),
'Miscellaneous'
),
]
]
# -- Options for Epub output -------------------------------------------------
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
# Bibliographic Dublin Core info.
...
@@ -187,7 +173,6 @@ epub_title = project
...
@@ -187,7 +173,6 @@ epub_title = project
# A list of files that should not be packed into the epub file.
# A list of files that should not be packed into the epub file.
epub_exclude_files
=
[
'search.html'
]
epub_exclude_files
=
[
'search.html'
]
# -- Extension configuration -------------------------------------------------
# -- Extension configuration -------------------------------------------------
# -- Options for intersphinx extension ---------------------------------------
# -- Options for intersphinx extension ---------------------------------------
...
...
paddleaudio/paddleaudio/compliance/__init__.py
浏览文件 @
4051e7b7
...
@@ -11,3 +11,5 @@
...
@@ -11,3 +11,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
.
import
kaldi
from
.
import
librosa
paddleaudio/paddleaudio/metric/mcd.py
浏览文件 @
4051e7b7
...
@@ -22,7 +22,9 @@ __all__ = [
...
@@ -22,7 +22,9 @@ __all__ = [
]
]
def
mcd_distance
(
xs
:
np
.
ndarray
,
ys
:
np
.
ndarray
,
cost_fn
:
Callable
=
mt
.
logSpecDbDist
)
->
float
:
def
mcd_distance
(
xs
:
np
.
ndarray
,
ys
:
np
.
ndarray
,
cost_fn
:
Callable
=
mt
.
logSpecDbDist
)
->
float
:
"""Mel cepstral distortion (MCD), dtw distance.
"""Mel cepstral distortion (MCD), dtw distance.
Dynamic Time Warping.
Dynamic Time Warping.
...
...
paddlespeech/t2s/frontend/zh_normalization/chronology.py
浏览文件 @
4051e7b7
...
@@ -64,7 +64,7 @@ def replace_time(match) -> str:
...
@@ -64,7 +64,7 @@ def replace_time(match) -> str:
result
=
f
"
{
num2str
(
hour
)
}
点"
result
=
f
"
{
num2str
(
hour
)
}
点"
if
minute
.
lstrip
(
'0'
):
if
minute
.
lstrip
(
'0'
):
if
int
(
minute
)
==
30
:
if
int
(
minute
)
==
30
:
result
+=
f
"半"
result
+=
"半"
else
:
else
:
result
+=
f
"
{
_time_num2str
(
minute
)
}
分"
result
+=
f
"
{
_time_num2str
(
minute
)
}
分"
if
second
and
second
.
lstrip
(
'0'
):
if
second
and
second
.
lstrip
(
'0'
):
...
@@ -75,7 +75,7 @@ def replace_time(match) -> str:
...
@@ -75,7 +75,7 @@ def replace_time(match) -> str:
result
+=
f
"
{
num2str
(
hour_2
)
}
点"
result
+=
f
"
{
num2str
(
hour_2
)
}
点"
if
minute_2
.
lstrip
(
'0'
):
if
minute_2
.
lstrip
(
'0'
):
if
int
(
minute
)
==
30
:
if
int
(
minute
)
==
30
:
result
+=
f
"半"
result
+=
"半"
else
:
else
:
result
+=
f
"
{
_time_num2str
(
minute_2
)
}
分"
result
+=
f
"
{
_time_num2str
(
minute_2
)
}
分"
if
second_2
and
second_2
.
lstrip
(
'0'
):
if
second_2
and
second_2
.
lstrip
(
'0'
):
...
...
paddlespeech/vector/cluster/diarization.py
浏览文件 @
4051e7b7
...
@@ -16,22 +16,20 @@ This script contains basic functions used for speaker diarization.
...
@@ -16,22 +16,20 @@ This script contains basic functions used for speaker diarization.
This script has an optional dependency on open source sklearn library.
This script has an optional dependency on open source sklearn library.
A few sklearn functions are modified in this script as per requirement.
A few sklearn functions are modified in this script as per requirement.
"""
"""
import
argparse
import
argparse
import
warnings
import
warnings
import
scipy
import
numpy
as
np
from
distutils.util
import
strtobool
from
distutils.util
import
strtobool
import
numpy
as
np
import
scipy
import
sklearn
from
scipy
import
sparse
from
scipy
import
sparse
from
scipy.sparse.linalg
import
eigsh
from
scipy.sparse.csgraph
import
connected_components
from
scipy.sparse.csgraph
import
connected_components
from
scipy.sparse.csgraph
import
laplacian
as
csgraph_laplacian
from
scipy.sparse.csgraph
import
laplacian
as
csgraph_laplacian
from
scipy.sparse.linalg
import
eigsh
import
sklearn
from
sklearn.neighbors
import
kneighbors_graph
from
sklearn.cluster
import
SpectralClustering
from
sklearn.cluster
import
SpectralClustering
from
sklearn.cluster._kmeans
import
k_means
from
sklearn.cluster._kmeans
import
k_means
from
sklearn.neighbors
import
kneighbors_graph
def
_graph_connected_component
(
graph
,
node_id
):
def
_graph_connected_component
(
graph
,
node_id
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录