Builds testing.

This commit is contained in:
Michael Chung committed 2023-10-21 01:13:39 -04:00
1 parent 2686cb94e0
commit 9f7fc09e9f
2 files changed
+7 -14

No files matched your search

@@ -21,21 +21,21 @@ pub async fn process_single_tts_job(
) -> Result<JobSuccessResult, ProcessSingleJobError> {
// TODO: Move common checks for slurs, etc. here.
let raw_inference_text = job.maybe_raw_inference_text
.as_deref()
.ok_or(ProcessSingleJobError::Other(anyhow!("no inference text")))?;
match job.maybe_model_type {
Some(InferenceModelType::VallEX) => {
// Zero-shot TTS does not need a fine-tuned model token.
dispatch_zero_shot_model(
job_dependencies,
job,
&raw_inference_text
job
).await
},
Some(InferenceModelType::Tacotron2 | InferenceModelType::Vits) => {
// All other TTS types require a fine-tuned TTS database record.
let raw_inference_text = job.maybe_raw_inference_text
.as_deref()
.ok_or(ProcessSingleJobError::Other(anyhow!("no inference text")))?;
dispatch_fine_tuned_weights_model(
job_dependencies,
job,
@@ -54,21 +54,14 @@ pub async fn process_single_tts_job(
async fn dispatch_zero_shot_model(
job_dependencies: &JobDependencies,
job: &AvailableInferenceJob,
raw_inference_text: &str,
) -> Result<JobSuccessResult, ProcessSingleJobError> {
match job.maybe_model_type {
Some(InferenceModelType::VallEX) => {
vall_e_x::process_job::process_job(VALLEXProcessJobArgs {
job_dependencies,
job,
}).await
}
_ => {
Err(ProcessSingleJobError::Other(anyhow!("not a zero-shot model")))
@@ -121,7 +121,7 @@ pub async fn process_create_voice(
let mut job_progress_reporter = deps.job_progress_reporter
.new_generic_inference(job.inference_job_token.as_str())
.map_err(|e| ProcessSingleJobError::Other(anyhow!(e)))?;
println!("token! {}",dataset_token);
let voice_dataset_token = tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken(dataset_token);
// download data set files into a temp directory
@@ -143,7 +143,7 @@ pub async fn process_create_voice(
single_dataset = val;
},
None => {
return Err(ProcessSingleJobError::InvalidJob(anyhow!("Missing Text for Inference")));
return Err(ProcessSingleJobError::InvalidJob(anyhow!("Missing Dataset")));
}
}