Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
8b35b3bd
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看板
未验证
提交
8b35b3bd
编写于
10月 29, 2021
作者:
H
Hui Zhang
提交者:
GitHub
10月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #947 from zh794390558/soundfile
[bugfix] Soundfile install
上级
28519c1f
9a45a75a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
9 deletion
+28
-9
parakeet/data/batch.py
parakeet/data/batch.py
+2
-2
parakeet/exps/tacotron2/ljspeech.py
parakeet/exps/tacotron2/ljspeech.py
+3
-6
tools/Makefile
tools/Makefile
+1
-1
tools/extras/README.md
tools/extras/README.md
+4
-0
tools/extras/install_soundfile.sh
tools/extras/install_soundfile.sh
+18
-0
未找到文件。
parakeet/data/batch.py
浏览文件 @
8b35b3bd
...
@@ -53,8 +53,8 @@ def batch_text_id(minibatch, pad_id=0, dtype=np.int64):
...
@@ -53,8 +53,8 @@ def batch_text_id(minibatch, pad_id=0, dtype=np.int64):
peek_example
=
minibatch
[
0
]
peek_example
=
minibatch
[
0
]
assert
len
(
peek_example
.
shape
)
==
1
,
"text example is an 1D tensor"
assert
len
(
peek_example
.
shape
)
==
1
,
"text example is an 1D tensor"
lengths
=
[
example
.
shape
[
0
]
for
example
in
minibatch
lengths
=
[
example
.
shape
[
0
]
for
example
in
]
# assume (channel, n_samples) or (n_samples, )
minibatch
]
# assume (channel, n_samples) or (n_samples, )
max_len
=
np
.
max
(
lengths
)
max_len
=
np
.
max
(
lengths
)
batch
=
[]
batch
=
[]
...
...
parakeet/exps/tacotron2/ljspeech.py
浏览文件 @
8b35b3bd
...
@@ -67,19 +67,16 @@ class LJSpeechCollector(object):
...
@@ -67,19 +67,16 @@ class LJSpeechCollector(object):
# Sort by text_len in descending order
# Sort by text_len in descending order
texts
=
[
texts
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
texts
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
texts
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
mels
=
[
mels
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
mels
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
mels
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
mel_lens
=
[
mel_lens
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
mel_lens
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
mel_lens
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
...
...
tools/Makefile
浏览文件 @
8b35b3bd
...
@@ -24,7 +24,7 @@ clean:
...
@@ -24,7 +24,7 @@ clean:
apt.done
:
apt.done
:
apt update
-y
apt update
-y
apt
install
-y
bc flac jq vim tig tree pkg-config libflac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev
apt
install
-y
bc flac jq vim tig tree pkg-config lib
sndfile1 lib
flac-dev libogg-dev libvorbis-dev libboost-dev swig python3-dev
echo
"check_certificate = off"
>>
~/.wgetrc
echo
"check_certificate = off"
>>
~/.wgetrc
touch
apt.done
touch
apt.done
...
...
tools/extras/README.md
浏览文件 @
8b35b3bd
# install scripts
call from
`tools`
dir.
## Details
1.
kaldi
1.
kaldi
deps gcc, mkl or openblas
deps gcc, mkl or openblas
...
...
tools/extras/install_soundfile.sh
0 → 100755
浏览文件 @
8b35b3bd
# install package libsndfile
WGET
=
wget
--no-check-certificate
SOUNDFILE
=
libsndfile-1.0.28
SOUNDFILE_LIB
=
${
SOUNDFILE
}
tar.gz
echo
"Install package libsndfile into default system path."
test
-e
${
SOUNDFILE_LIB
}
||
${
WGET
}
-c
"http://www.mega-nerd.com/libsndfile/files/
${
SOUNDFILE_LIB
}
"
if
[
$?
!=
0
]
;
then
echo
"Download
${
SOUNDFILE_LIB
}
failed !!!"
exit
1
fi
tar
-zxvf
${
SOUNDFILE_LIB
}
pushd
${
SOUNDFILE
}
./configure
>
/dev/null
&&
make
>
/dev/null
&&
make
install
>
/dev/null
popd
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录