mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-14 22:02:36 +00:00
sequence length
This commit is contained in:
1 parent
90aa091398
commit
a735d3e972
2 files changed
+10
No files matched your search
+7
@@ -8,8 +8,12 @@ pub struct Args <'a> {
|
||||
// TODO: This will be multiple types in the future
|
||||
pub news_story_token: &'a NewsStoryToken,
|
||||
|
||||
// 1-indexed offset of the audio file within the total speech
|
||||
pub sequence_order: i64,
|
||||
|
||||
// Total number of wav file items in the speech
|
||||
pub sequence_length: i64,
|
||||
|
||||
pub tts_voice_identifier: &'a TtsModelToken,
|
||||
|
||||
pub full_text: &'a str,
|
||||
@@ -30,6 +34,7 @@ INSERT INTO tts_render_tasks(
|
||||
story_type,
|
||||
story_token,
|
||||
sequence_order,
|
||||
sequence_length,
|
||||
tts_service,
|
||||
tts_voice_identifier,
|
||||
full_text
|
||||
@@ -39,6 +44,7 @@ VALUES (
|
||||
"news_story",
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
"fakeyou",
|
||||
?,
|
||||
?
|
||||
@@ -47,6 +53,7 @@ VALUES (
|
||||
tts_render_task_token,
|
||||
news_story_token,
|
||||
args.sequence_order,
|
||||
args.sequence_length,
|
||||
tts_voice_identifier,
|
||||
args.full_text
|
||||
);
|
||||
|
||||
+3
@@ -49,12 +49,15 @@ pub async fn process_single_item(target: &NewsStoryProductionItem, job_state: &A
|
||||
// NB: John Madden voice model
|
||||
let tts_model_token = TtsModelToken::new_from_str("TM:30ha2t6bxfn4");
|
||||
|
||||
let sequence_length = paragraphs.len() as i64;
|
||||
|
||||
for (i, paragraph) in paragraphs.iter().enumerate() {
|
||||
let sequence_order = (i + 1) as i64;
|
||||
|
||||
insert_tts_render_task(InsertArgs {
|
||||
news_story_token: &target.news_story_token,
|
||||
sequence_order,
|
||||
sequence_length,
|
||||
tts_voice_identifier: &tts_model_token,
|
||||
full_text: ¶graph,
|
||||
sqlite_pool: &job_state.sqlite_pool,
|
||||
|
||||
Reference in new issue
Block a user