DeepSpeech/native_client/client.py
Reuben Morais 1c4cbf1813 Support custom alphabet mappings (Fixes #692) (#797)
Support custom alphabet mappings
2017-08-31 11:51:15 +02:00

12 lines
293 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import sys
import scipy.io.wavfile as wav
from deepspeech.model import Model
ds = Model(sys.argv[1], 26, 9, sys.argv[3])
fs, audio = wav.read(sys.argv[2])
print(ds.stt(audio, fs))