Skip to content

Commit

Permalink
flatten accent
Browse files Browse the repository at this point in the history
  • Loading branch information
Fogapod committed Feb 18, 2024
1 parent d7133d2 commit 3f7f0d9
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 157 deletions.
184 changes: 91 additions & 93 deletions assets/accents/french.accent.ron
Original file line number Diff line number Diff line change
@@ -1,98 +1,96 @@
(
name: "French",
description: "French accent",
accent: (
accent: {
"main": (
format: r"\b{}\b",
rules: {
"a": {"Any": [
{"Literal": "un"},
{"Literal": "une"},
]},
"am": {"Literal": "suis"},
"and": {"Literal": "et"},
"the": {"Any": [
{"Literal": "les"},
{"Literal": "la"},
{"Literal": "le"},
]},
"for": {"Literal": "pour"},
"of": {"Literal": "de"},
"my": {"Any": [
{"Literal": "mon"},
{"Literal": "ma"},
]},
"very": {"Literal": "très"},
"want": {"Literal": "vouloir"},
"with": {"Literal": "avec"},
"i'?m": {"Literal": "je suis"},
"i": {"Literal": "je"},
"good": {"Literal": "bon"},
"bad": {"Literal": "mal"},
"spicy": {"Any": [
{"Literal": "épicé"},
{"Literal": "épicée"},
]},
"yes": {"Literal": "oui"},
"no": {"Literal": "non"},
"why": {"Literal": "pourquoi"},
"what'?s": {"Literal": "quel est"},
"who'?s": {"Literal": "qui est"},
"hello": {"Any": [
{"Literal": "'allô"},
{"Literal": "bonjour"},
{"Literal": "salut"},
]},
"bye": {"Any": [
{"Literal": "bon voyage"},
{"Literal": "adieu"},
{"Literal": "au revoir"},
]},
"thanks": {"Literal": "merci"},
"assistant": {"Literal": "ravageur"},
"assistants": {"Literal": "ravageurs"},
"captain": {"Literal": "capitaine"},
"cook": {"Any": [
{"Literal": "cuisinier"},
{"Literal": "cuisinière"},
]},
"enemy": {"Any": [
{"Literal": "silly english dog"},
{"Literal": "ennemi"},
{"Literal": "ennemie"},
]},
"friend": {"Literal": "ami"},
"friends": {"Literal": "amis"},
"greytider?": {"Literal": "gitans"},
"changeling": {"Literal": "changeur"},
"wizard": {"Literal": "sorcier"},
"(?:op|operative)": {"Literal": "boche"},
"(?:op|operative)s": {"Literal": "boches"},
"cheese": {"Any": [
{"Literal": "brie"},
{"Literal": "roquefort"},
{"Literal": "camembert"},
]},
"bread": {"Literal": "baguette"},
"tomato": {"Literal": "tomate"},
"wine": {"Literal": "vin"},
"traitor": {"Literal": "traitre"},
"maint": {"Literal": "banlieues"},
"nuke": {"Any": [
{"Literal": "grand bombe"},
{"Literal": "la baguette ultime"},
]},
"shit": {"Literal": "merde"},
"urity": {"Literal": "urite"},
"security": {"Literal": "securite"},
"shitsec": {"Any": [
{"Literal": "gendarmerie"},
{"Literal": "keufs"},
]},
},
),
}
),
accent: {
"main": (
format: r"\b{}\b",
rules: {
"a": {"Any": [
{"Literal": "un"},
{"Literal": "une"},
]},
"am": {"Literal": "suis"},
"and": {"Literal": "et"},
"the": {"Any": [
{"Literal": "les"},
{"Literal": "la"},
{"Literal": "le"},
]},
"for": {"Literal": "pour"},
"of": {"Literal": "de"},
"my": {"Any": [
{"Literal": "mon"},
{"Literal": "ma"},
]},
"very": {"Literal": "très"},
"want": {"Literal": "vouloir"},
"with": {"Literal": "avec"},
"i'?m": {"Literal": "je suis"},
"i": {"Literal": "je"},
"good": {"Literal": "bon"},
"bad": {"Literal": "mal"},
"spicy": {"Any": [
{"Literal": "épicé"},
{"Literal": "épicée"},
]},
"yes": {"Literal": "oui"},
"no": {"Literal": "non"},
"why": {"Literal": "pourquoi"},
"what'?s": {"Literal": "quel est"},
"who'?s": {"Literal": "qui est"},
"hello": {"Any": [
{"Literal": "'allô"},
{"Literal": "bonjour"},
{"Literal": "salut"},
]},
"bye": {"Any": [
{"Literal": "bon voyage"},
{"Literal": "adieu"},
{"Literal": "au revoir"},
]},
"thanks": {"Literal": "merci"},
"assistant": {"Literal": "ravageur"},
"assistants": {"Literal": "ravageurs"},
"captain": {"Literal": "capitaine"},
"cook": {"Any": [
{"Literal": "cuisinier"},
{"Literal": "cuisinière"},
]},
"enemy": {"Any": [
{"Literal": "silly english dog"},
{"Literal": "ennemi"},
{"Literal": "ennemie"},
]},
"friend": {"Literal": "ami"},
"friends": {"Literal": "amis"},
"greytider?": {"Literal": "gitans"},
"changeling": {"Literal": "changeur"},
"wizard": {"Literal": "sorcier"},
"(?:op|operative)": {"Literal": "boche"},
"(?:op|operative)s": {"Literal": "boches"},
"cheese": {"Any": [
{"Literal": "brie"},
{"Literal": "roquefort"},
{"Literal": "camembert"},
]},
"bread": {"Literal": "baguette"},
"tomato": {"Literal": "tomate"},
"wine": {"Literal": "vin"},
"traitor": {"Literal": "traitre"},
"maint": {"Literal": "banlieues"},
"nuke": {"Any": [
{"Literal": "grand bombe"},
{"Literal": "la baguette ultime"},
]},
"shit": {"Literal": "merde"},
"urity": {"Literal": "urite"},
"security": {"Literal": "securite"},
"shitsec": {"Any": [
{"Literal": "gendarmerie"},
{"Literal": "keufs"},
]},
},
),
},
)

126 changes: 62 additions & 64 deletions assets/accents/spurdo.accent.ron
Original file line number Diff line number Diff line change
@@ -1,88 +1,86 @@
(
name: "Spurdo",
description: "Finnish accent",
accent: (
accent: {
accent: {
"main": (
rules: {
r"\bepic\b": {"Literal": "ebin"},
r"\b:?\)\b": {"Any": [
{"Literal": ":D"},
{"Literal": ":DD"},
{"Literal": ":DDD"},
]},
r"\Bng\b": {"Literal": "gn"},
"xc": {"Literal": "gg"},
"c": {"Literal": "g"},
"k": {"Literal": "g"},
"t": {"Literal": "d"},
"p": {"Literal": "b"},
"x": {"Literal": "gs"},
},
),
"ending": (
rules: {
"$": {"Weights": {
1: {"Original": ()},
1: {"Any": [
{"Literal": " :D"},
{"Literal": " :DD"},
{"Literal": " :DDD"},
{"Literal": " :DDDD"},
{"Literal": " :DDDDD"},
]},
}},
},
),
},
intensities: {
1: Extend({
"main": (
rules: {
r"\bepic\b": {"Literal": "ebin"},
r"\b:?\)\b": {"Any": [
{"Literal": ":D"},
{"Literal": ":DD"},
{"Literal": ":DDD"},
{"Literal": ":DDDD"},
]},
r"\Bng\b": {"Literal": "gn"},
"xc": {"Literal": "gg"},
"c": {"Literal": "g"},
"k": {"Literal": "g"},
"t": {"Literal": "d"},
"p": {"Literal": "b"},
"x": {"Literal": "gs"},
},
),
"ending": (
rules: {
"$": {"Weights": {
1: {"Original": ()},
1: {"Any": [
{"Literal": " :D"},
2: {"Any": [
{"Literal": " :DD"},
{"Literal": " :DDD"},
{"Literal": " :DDDD"},
{"Literal": " :DDDDD"},
{"Literal": " :DDDDDD"},
]},
}},
},
),
},
intensities: {
1: Extend({
"main": (
rules: {
r"\b:?\)\b": {"Any": [
{"Literal": ":DD"},
{"Literal": ":DDD"},
{"Literal": ":DDDD"},
]},
},
),
"ending": (
rules: {
"$": {"Weights": {
1: {"Original": ()},
2: {"Any": [
{"Literal": " :DD"},
{"Literal": " :DDD"},
{"Literal": " :DDDD"},
{"Literal": " :DDDDD"},
{"Literal": " :DDDDDD"},
]},
}},
},
),
}),
2: Extend({
"main": (
rules: {
r"\b:?\)\b": {"Any": [
{"Literal": ":DDDD"},
{"Literal": ":DDDDD"},
{"Literal": ":DDDDDD"},
]},
},
),
"ending": (
rules: {
"$": {"Any": [
{"Literal": " :DDDD"},
{"Literal": " :DDDDD"},
{"Literal": " :DDDDDD"},
{"Literal": " :DDDDDDD"},
{"Literal": " :DDDDDDDD"},
]},
},
),
}),
},
),
}),
2: Extend({
"main": (
rules: {
r"\b:?\)\b": {"Any": [
{"Literal": ":DDDD"},
{"Literal": ":DDDDD"},
{"Literal": ":DDDDDD"},
]},
},
),
"ending": (
rules: {
"$": {"Any": [
{"Literal": " :DDDD"},
{"Literal": " :DDDDD"},
{"Literal": " :DDDDDD"},
{"Literal": " :DDDDDDD"},
{"Literal": " :DDDDDDDD"},
]},
},
),
}),
},
)
1 change: 1 addition & 0 deletions crates/speech/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ impl Plugin for SpeechPlugin {
pub struct AccentDefinition {
pub name: String,
pub description: String,
#[serde(flatten)]
accent: sayit::Accent,
}

Expand Down

0 comments on commit 3f7f0d9

Please sign in to comment.