-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinference.py
35 lines (26 loc) · 1.27 KB
/
inference.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import tensorflow as tf
# Default hyper-parameters:
inference_params = tf.contrib.training.HParams(
# Checkpoint folder used for loading the latest checkpoint.
checkpoint_dir='/tmp/tacotron/ljspeech/LJSpeech',
# Run folder to load a checkpoint from the checkpoint folder.
checkpoint_load_run='train',
# Direct path to a checkpoint file to restore for inference.
# If `checkpoint_file` is None, the latest checkpoint will be restored.
checkpoint_file=None,
# Run folder to save summaries in the checkpoint folder.
checkpoint_save_run='inference',
# The path were to save the inference results.
synthesis_dir='/thesis/inference/ljspeech',
# Path to a file containing sentences to synthesize.
# On sentence per line is expected.
synthesis_file='/tmp/inference/sentences.txt',
# Flag controlling if the alignments should be dumped as .npz files.
# Dumps are written into `synthesis_dir`/alignments.npz.
dump_alignments=True,
# Flag controlling if the linear-scale spectrogram should be dumped as .npz files.
# Dumps are written into `synthesis_dir`/linear-spectrogram.npz.
dump_linear_spectrogram=True,
# The number of process to threads to use for parallel Griffin-Lim reconstruction.
n_synthesis_threads=6
)