提交 9f907b9b 编写于 作者: H Hui Zhang

sox speed pertrub shape (T, C), float64, process using int32

上级 c7708d8a
......@@ -351,7 +351,9 @@ class AudioSegment(object):
tfm.set_globals(multithread=False)
tfm.speed(speed_rate)
self._samples = tfm.build_array(
input_array=self._samples, sample_rate_in=self._sample_rate).copy()
input_array=self._samples,
sample_rate_in=self._sample_rate).squeeze(-1).astype(
np.float32).copy()
def normalize(self, target_db=-20, max_gain_db=300.0):
"""Normalize audio to be of the desired RMS value in decibels.
......
[
{
"type": "speed",
"params": {
"min_speed_rate": 0.9,
"max_speed_rate": 1.1,
"num_rates": 3
},
"prob": 0.0
},
{
"type": "shift",
"params": {
......
......@@ -6,7 +6,7 @@
"max_speed_rate": 1.1,
"num_rates": 3
},
"prob": 0.0
"prob": 1.0
},
{
"type": "shift",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册