Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover committed Apr 30, 2024
1 parent 2f8cfca commit 9bb34f2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/libconf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ struct Extra {
enable_debugging_extras: bool,
#[allow(dead_code)]
use_external_sentence_api: bool,
#[allow(dead_code)]
no_local_sentence_gen: bool,
}

impl Default for Basic {
Expand Down Expand Up @@ -64,7 +66,9 @@ impl Default for Extra {
#[allow(dead_code)]
enable_debugging_extras: false,
#[allow(dead_code)]
use_external_sentence_api: false
use_external_sentence_api: false,
#[allow(dead_code)]
no_local_sentence_gen: false,
}
}
}
Expand Down Expand Up @@ -142,9 +146,10 @@ pub async fn get_options(config: Config) -> Vec<(&'static str, usize)> {
}
if config.basic.do_gen_tts {
if config.extra.use_external_sentence_api {
options.push(("quote_gen_ext", 10));
} else {
options.push(("quote_gen", 10));
options.push(("quote_gen_ext", 5));
}
if !config.extra.no_local_sentence_gen {
options.push(("quote_gen", 5));
}
}

Expand Down

0 comments on commit 9bb34f2

Please sign in to comment.