mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 06:42:14 +00:00
fix gptsovits output file pathing
This commit is contained in:
1 parent
c803be4ed4
commit
b2a9cdc830
2 files changed
+11
-3
No files matched your search
+4
-2
@@ -56,7 +56,8 @@ pub struct InferenceArgs<'s> {
|
||||
pub reference_transcript_path: Option<&'s Path>,
|
||||
pub reference_language : Option<&'s str>,
|
||||
|
||||
pub output_audio_directory: &'s Path,
|
||||
//pub output_audio_directory: &'s Path,
|
||||
pub output_file_path: &'s Path,
|
||||
|
||||
pub maybe_reference_free: Option<bool>,
|
||||
pub maybe_temperature: Option<f32>,
|
||||
@@ -170,7 +171,8 @@ impl GptSovitsInferenceCommand {
|
||||
}
|
||||
}
|
||||
|
||||
command.push_str(&format!(" --output_path {}", path_to_string(args.output_audio_directory)));
|
||||
//command.push_str(&format!(" --output_path {}", path_to_string(args.output_audio_directory)));
|
||||
command.push_str(&format!(" --output_path {}", path_to_string(args.output_file_path)));
|
||||
|
||||
if let Some(reference_free) = args.maybe_reference_free {
|
||||
command.push_str(&format!(" --ref_free {}", reference_free));
|
||||
|
||||
+7
-1
@@ -66,6 +66,11 @@ pub async fn process_single_gpt_sovits_tts_job(
|
||||
.map_err(|err| ProcessSingleJobError::IoError(err))?;
|
||||
}
|
||||
|
||||
if output_file_path.exists() {
|
||||
std::fs::remove_file(&output_file_path)
|
||||
.map_err(|err| ProcessSingleJobError::IoError(err))?;
|
||||
}
|
||||
|
||||
let input_text = job_args.input_text;
|
||||
let gpt_sovits_model = job_args.gpt_sovits_model;
|
||||
|
||||
@@ -124,7 +129,8 @@ pub async fn process_single_gpt_sovits_tts_job(
|
||||
reference_audio_path: reference_audio_path.as_deref(),
|
||||
reference_transcript_path: reference_transcript_path.as_deref(),
|
||||
reference_language: Some(DEFAULT_LANGUAGE),
|
||||
output_audio_directory: &output_dir,
|
||||
//output_audio_directory: &output_dir,
|
||||
output_file_path: &output_file_path,
|
||||
maybe_reference_free: None,
|
||||
maybe_temperature: None,
|
||||
maybe_target_language: Some(DEFAULT_LANGUAGE),
|
||||
|
||||
Reference in new issue
Block a user