“51c8f92337daa807082539410d424daf6486a0ba”上不存在“mobile/src/operators/feed_op.cpp”
提交 1d400240 编写于 作者: H huangyuxin

separate the sox and soxbindings with the requirements

上级 df5fe035
......@@ -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)
......
......@@ -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
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册