mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
Rebuild arpabet override / changes file from diff
This commit is contained in:
1 parent
5521c47ebc
commit
473ea31f4d
4 files changed
+44
No files matched your search
@@ -5,6 +5,7 @@
|
||||
sound_path = "./sounds"
|
||||
html_path = "./web"
|
||||
phoneme_dictionary_file = "./dictionary/cmudict-0.7b"
|
||||
arpabet_override_dictionary_file = "./dictionary/cmu-changeset"
|
||||
extra_dictionary_file = "./dictionary/extra-dict"
|
||||
square_dictionary_file = "./dictionary/square-dict"
|
||||
abbreviation_file = "./dictionary/abbreviations.dict"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
BASIS(1) B EY1 S AH0 S
|
||||
BASIS B EY1 S IH0 S
|
||||
BEGAN(1) B IH0 G AE1 N
|
||||
BEGAN B IY0 G AE1 N
|
||||
;;; "california" is more appropriate here,
|
||||
;;; CA K AH1
|
||||
;;; CA(1) S IY1 EY1
|
||||
;;; CA(2) K AA1
|
||||
DOCUMENT(1) D AA1 K Y AH0 M EH0 N T
|
||||
DOCUMENT D AA1 K Y UW0 M EH0 N T
|
||||
DEJA D EY2 JH AA1
|
||||
FINANCIALS(1) F AY2 N AE1 N SH AH0 L Z
|
||||
FINANCIALS F IH0 N AE1 N SH AH0 L Z
|
||||
PAGES(1) P EY1 JH AH0 Z
|
||||
PAGES P EY1 JH IH0 Z
|
||||
PLACES(1) P L EY1 S AH0 Z
|
||||
PLACES P L EY1 S IH0 Z
|
||||
REPRESENTED(1) R EH2 P R AH0 Z EH1 N T AH0 D
|
||||
REPRESENTED R EH2 P R IH0 Z EH1 N T IH0 D
|
||||
RESPECT(1) R IH0 S P EH1 K T
|
||||
RESPECT R IY0 S P EH1 K T
|
||||
SENATE(1) S EH1 N AH0 T
|
||||
SENATE S EH1 N IH0 T
|
||||
SIDED(1) S AY1 D AH0 D
|
||||
SIDED S AY1 D IH0 D
|
||||
TONIGHT(1) T AH0 N AY1 T
|
||||
TONIGHT T UW0 N AY1 T
|
||||
TONIGHT'S(1) T AH0 N AY1 T S
|
||||
TONIGHT'S T UW0 N AY1 T S
|
||||
UNITY(0) Y UW1 N AH0 T IY0
|
||||
UNITY Y UW1 N IH0 T IY0
|
||||
;;; Wyoming is more appropriate,
|
||||
;;; WY W EY1
|
||||
@@ -19,6 +19,7 @@ pub struct Config {
|
||||
|
||||
/// Where various arpabet files are located.
|
||||
pub phoneme_dictionary_file: Option<String>,
|
||||
pub arpabet_override_dictionary_file: Option<String>,
|
||||
pub extra_dictionary_file: Option<String>,
|
||||
pub square_dictionary_file: Option<String>,
|
||||
|
||||
@@ -106,6 +107,9 @@ impl Config {
|
||||
phoneme_dictionary_file: self.phoneme_dictionary_file
|
||||
.clone()
|
||||
.or(other.phoneme_dictionary_file.clone()),
|
||||
arpabet_override_dictionary_file: self.arpabet_override_dictionary_file
|
||||
.clone()
|
||||
.or(other.arpabet_override_dictionary_file.clone()),
|
||||
extra_dictionary_file: self.extra_dictionary_file
|
||||
.clone()
|
||||
.or(other.extra_dictionary_file.clone()),
|
||||
|
||||
@@ -149,6 +149,11 @@ fn create_parser_and_synthesizer(config: &Config) -> (Parser, Synthesizer) {
|
||||
info!("Reading Arpabet Dictionary...");
|
||||
let cmudict = Arpabet::load_cmudict();
|
||||
|
||||
info!("Reading Arpabet Override Dictionary...");
|
||||
let override_dictionary = Arpabet::load_from_file(
|
||||
&config.arpabet_override_dictionary_file.clone().unwrap())
|
||||
.expect("Error reading arpabet override dictionary");
|
||||
|
||||
info!("Reading Extra Dictionary...");
|
||||
let extra_dictionary = Arpabet::load_from_file(
|
||||
&config.extra_dictionary_file.clone().unwrap())
|
||||
@@ -160,6 +165,7 @@ fn create_parser_and_synthesizer(config: &Config) -> (Parser, Synthesizer) {
|
||||
.expect("Error reading square dictionary");
|
||||
|
||||
let arpabet = cmudict
|
||||
.combine(&override_dictionary)
|
||||
.combine(&extra_dictionary)
|
||||
.combine(&square_dictionary);
|
||||
|
||||
|
||||
Reference in new issue
Block a user