mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
libdeepspeech now uses the namespace DeepSpeech. The 'DeepSpeech' class has been renamed to 'Model', 'getMfccFrames' has been renamed to 'getInputVector' and a function outside of the Model class has been added, 'audioToInputVector' to allow it to be used without initialising TensorFlow and loading a model.
8 lines
161 B
Python
8 lines
161 B
Python
import sys
|
|
import scipy.io.wavfile as wav
|
|
from deepspeech import Model
|
|
|
|
ds = Model(sys.argv[1], 26, 9)
|
|
fs, audio = wav.read(sys.argv[2])
|
|
print ds.stt(audio, fs)
|