forked from clcarwin/DeepSpeech-Keras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
23 lines (19 loc) · 616 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import argparse
import os
from source.deepspeech import DeepSpeech
from source.configuration import Configuration
abspath = os.path.abspath(__file__)
ROOT_DIR = os.path.dirname(abspath)
os.chdir(ROOT_DIR)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--configuration', help='Experiment configuration')
args = parser.parse_args()
# Read configuration file
config = Configuration(file_path=args.configuration)
# Set up DeepSpeech object
ds = DeepSpeech(config)
# Model optimization
ds.train()
# Save whole deepspeech model
ds.save()