From 5cefd7069c3757f56fae2deef1a5b5ff520bd2e5 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 23 Nov 2021 14:21:11 +0100 Subject: [PATCH] Use known paths for Scorer and Alphabet copy in export --- training/coqui_stt_training/export.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/training/coqui_stt_training/export.py b/training/coqui_stt_training/export.py index ad44fa54..62d9cd3c 100644 --- a/training/coqui_stt_training/export.py +++ b/training/coqui_stt_training/export.py @@ -243,9 +243,13 @@ def export_savedmodel(): # Copy scorer and alphabet alongside SavedModel if Config.scorer_path: - print(f"Saving {Config.scorer_path} to {Config.export_dir}") - shutil.copy(Config.scorer_path, Config.export_dir) - shutil.copy(Config.effective_alphabet_path, Config.export_dir) + shutil.copy( + Config.scorer_path, os.path.join(Config.export_dir, "exported.scorer") + ) + shutil.copy( + Config.effective_alphabet_path, + os.path.join(Config.export_dir, "alphabet.txt"), + ) log_info(f"Exported SavedModel to {Config.export_dir}")