Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
1d400240
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看板
“51c8f92337daa807082539410d424daf6486a0ba”上不存在“mobile/src/operators/feed_op.cpp”
提交
1d400240
编写于
12月 10, 2021
作者:
H
huangyuxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
separate the sox and soxbindings with the requirements
上级
df5fe035
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
47 addition
and
23 deletion
+47
-23
paddlespeech/s2t/frontend/audio.py
paddlespeech/s2t/frontend/audio.py
+25
-13
paddlespeech/s2t/transform/perturb.py
paddlespeech/s2t/transform/perturb.py
+20
-8
setup.py
setup.py
+2
-2
未找到文件。
paddlespeech/s2t/frontend/audio.py
浏览文件 @
1d400240
...
...
@@ -21,7 +21,6 @@ import struct
import
numpy
as
np
import
resampy
import
soundfile
import
soxbindings
as
sox
from
scipy
import
signal
from
.utility
import
convert_samples_from_float32
...
...
@@ -355,6 +354,19 @@ class AudioSegment():
# self._samples = np.interp(new_indices, old_indices, self._samples)
# sox, slow
try
:
import
soxbindings
as
sox
except
:
try
:
from
paddlespeech.s2t.utils
import
dynamic_pip_install
package
=
"sox"
dynamic_pip_install
.
install
(
package
)
package
=
"soxbindings"
dynamic_pip_install
.
install
(
package
)
import
soxbindings
as
sox
except
:
raise
RuntimeError
(
"Can not install soxbindings on your system."
)
tfm
=
sox
.
Transformer
()
tfm
.
set_globals
(
multithread
=
False
)
tfm
.
speed
(
speed_rate
)
...
...
paddlespeech/s2t/transform/perturb.py
浏览文件 @
1d400240
...
...
@@ -16,7 +16,6 @@ import librosa
import
numpy
import
scipy
import
soundfile
import
soxbindings
as
sox
from
paddlespeech.s2t.io.reader
import
SoundHDF5File
...
...
@@ -146,6 +145,19 @@ class SpeedPerturbationSox():
self
.
keep_length
=
keep_length
self
.
state
=
numpy
.
random
.
RandomState
(
seed
)
try
:
import
soxbindings
as
sox
except
:
try
:
from
paddlespeech.s2t.utils
import
dynamic_pip_install
package
=
"sox"
dynamic_pip_install
.
install
(
package
)
package
=
"soxbindings"
dynamic_pip_install
.
install
(
package
)
import
soxbindings
as
sox
except
:
raise
RuntimeError
(
"Can not install soxbindings on your system."
)
if
utt2ratio
is
not
None
:
self
.
utt2ratio
=
{}
# Use the scheduled ratio for each utterances
...
...
setup.py
浏览文件 @
1d400240
...
...
@@ -55,8 +55,6 @@ requirements = {
"scipy"
,
"sentencepiece~=0.1.96"
,
"soundfile~=0.10"
,
"sox"
,
"soxbindings"
,
"textgrid"
,
"timer"
,
"tqdm"
,
...
...
@@ -74,6 +72,8 @@ requirements = {
"Pillow"
,
"pybind11"
,
"snakeviz"
,
"sox"
,
"soxbindings"
,
"unidecode"
,
"yq"
,
"pre-commit"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录