Merge branch 'develop' into ctc

pull/1099/head
Hui Zhang 3 years ago committed by GitHub
commit 764a5d4271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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",

Loading…
Cancel
Save