From 86b9d2eccacfa32b30e9af03f11670de686a80a4 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 1 Jun 2021 14:29:40 -0400 Subject: [PATCH] fixup tts_inference_job (python still needs writing) --- src/tts_inference_job.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tts_inference_job.rs b/src/tts_inference_job.rs index 9ed80a1941..6d649b0943 100644 --- a/src/tts_inference_job.rs +++ b/src/tts_inference_job.rs @@ -361,7 +361,9 @@ async fn process_job(inferencer: &Inferencer, job: &TtsInferenceJobRecord) -> An let temp_dir = format!("temp_tts_inference_{}", job.id); let temp_dir = TempDir::new(&temp_dir)?; // NB: Exists until it goes out of scope. - let text_input_fs_path = None; + let text_input_fs_path = temp_dir.path().join("inference_input.txt"); + + std::fs::write(&text_input_fs_path, &job.inference_text)?; // ==================== RUN INFERENCE ==================== // @@ -369,8 +371,6 @@ async fn process_job(inferencer: &Inferencer, job: &TtsInferenceJobRecord) -> An let output_metadata_fs_path = temp_dir.path().join("metadata.json"); let output_spectrogram_fs_path = temp_dir.path().join("spectrogram.json"); - let is_image = w2l_template.template_type.contains("image"); - info!("Running TTS inference..."); info!("Expected output audio filename: {:?}", &output_audio_fs_path);