mirror of https://github.com/coqui-ai/TTS.git
use soundfile for faster read
This commit is contained in:
parent
c6f970b65b
commit
d4b900f6c9
|
@ -753,7 +753,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
"version": "3.7.2"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
1
setup.py
1
setup.py
|
@ -83,6 +83,7 @@ setup(
|
|||
# "lws",
|
||||
"tqdm",
|
||||
"phonemizer",
|
||||
"soundfile",
|
||||
],
|
||||
dependency_links=[
|
||||
'http://github.com/bootphon/phonemizer/tarball/master#egg=phonemizer'
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import librosa
|
||||
import soundfile as sf
|
||||
import pickle
|
||||
import copy
|
||||
import numpy as np
|
||||
|
@ -230,7 +231,7 @@ class AudioProcessor(object):
|
|||
# return np.sign(signal) * magnitude
|
||||
|
||||
def load_wav(self, filename, encode=False):
|
||||
x, sr = librosa.load(filename, sr=self.sample_rate)
|
||||
x, sr = sf.read(filename)
|
||||
if self.do_trim_silence:
|
||||
x = self.trim_silence(x)
|
||||
# sr, x = io.wavfile.read(filename)
|
||||
|
|
Loading…
Reference in New Issue