Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 213 additions & 0 deletions apps/site/public/audio/estonian-lessons/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28574,6 +28574,219 @@
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/bussipeatus-on-vasakul": {
"text": "Bussipeatus on vasakul.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/c-rong": {
"text": "Tere! Kuhu te soovite sõita? Tere! Palun üks pilet Tartusse. Mis kell järgmine rong väljub? Järgmine rong väljub kahekümne minuti pärast. Kas soovite ainult ühe suuna piletit või edasi-tagasi? Ainult ühe suuna, aitäh. Tulen tagasi alles pühapäeval. See maksab kaksteist eurot. Kas maksate kaardiga või sularahas? Kaardiga, palun. Kus on teine tee? Minge siit uksest otse välja ja pöörake paremale. Rong ootab teisel teel paremal. Head reisi! Suur aitäh!",
"model": "eleven_v4",
"turns": [
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"Tere! Kuhu te soovite sõita?"
]
},
{
"voice": "0cuaFlR2we1Gl3woPjeJ",
"sentences": [
"Tere! Palun üks pilet Tartusse."
]
},
{
"voice": "0cuaFlR2we1Gl3woPjeJ",
"sentences": [
"Mis kell järgmine rong väljub?"
]
},
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"Järgmine rong väljub kahekümne minuti pärast."
]
},
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"Kas soovite ainult ühe suuna piletit või edasi-tagasi?"
]
},
{
"voice": "0cuaFlR2we1Gl3woPjeJ",
"sentences": [
"Ainult ühe suuna, aitäh. Tulen tagasi alles pühapäeval."
]
},
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"See maksab kaksteist eurot. Kas maksate kaardiga või sularahas?"
]
},
{
"voice": "0cuaFlR2we1Gl3woPjeJ",
"sentences": [
"Kaardiga, palun. Kus on teine tee?"
]
},
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"Minge siit uksest otse välja ja pöörake paremale."
]
},
{
"voice": "xd3ufyLcuKKZZXDZO9H7",
"sentences": [
"Rong ootab teisel teel paremal. Head reisi!"
]
},
{
"voice": "0cuaFlR2we1Gl3woPjeJ",
"sentences": [
"Suur aitäh!"
],
"say": "[warm] Suur aitäh!"
}
]
},
"tee-ja-reisimine/ei-ainult-viis-minutit-jalgsi": {
"text": "Ei, ainult viis minutit jalgsi.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/jaam": {
"text": "jaam",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/jaam-on-paremal": {
"text": "Jaam on paremal.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/jah-suur-punane-maja-paremal": {
"text": "Jah, suur punane maja paremal.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/kas-jaam-on-paremal": {
"text": "Kas jaam on paremal?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/kas-see-on-kaugel": {
"text": "Kas see on kaugel?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/kohvik-on-vasakul": {
"text": "Kohvik on vasakul.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/kus-on-bussipeatus": {
"text": "Kus on bussipeatus?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/minge-otse-edasi": {
"text": "Minge otse edasi.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/minge-otse-edasi-ja-siis-po2o2rake-pargi-juures-vasakule": {
"text": "Minge otse edasi ja siis pöörake pargi juures vasakule.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/minge-pargi-juures-vasakule": {
"text": "Minge pargi juures vasakule.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/mis-kell-rong-va2ljub": {
"text": "Mis kell rong väljub?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/otse": {
"text": "otse",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/palun-u2ks-pilet-tartusse": {
"text": "Palun üks pilet Tartusse.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/paremal": {
"text": "paremal",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/paremale": {
"text": "paremale",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/peatus": {
"text": "peatus",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/pilet": {
"text": "pilet",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/po2o2rake-kooli-juures-paremale": {
"text": "Pöörake kooli juures paremale.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/po2o2rake-paremale": {
"text": "Pöörake paremale!",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/po2o2rake-vasakule": {
"text": "Pöörake vasakule.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/pood-on-paremal": {
"text": "Pood on paremal.",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/suur-aita2h-head-pa2eva": {
"text": "Suur aitäh! Head päeva!",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/tere-kuidas-ma-saan-teid-aidata": {
"text": "Tere! Kuidas ma saan teid aidata?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/vabandage-kus-on-rongijaam": {
"text": "Vabandage, kus on rongijaam?",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/vasakul": {
"text": "vasakul",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tee-ja-reisimine/vasakule": {
"text": "vasakule",
"model": "eleven_v4",
"voice": "jGja51dd7gcoK0zkxeyg"
},
"tegevusnimed/armastan": {
"text": "armastan",
"model": "eleven_v4",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"marks":[0,1.84,4.8,7,10.96,14.96,18.96,23.76,26.72,30.08,33.92],"speakers":["third","fourth","fourth","third","third","fourth","third","fourth","third","third","fourth"],"duration":35.12}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
145 changes: 145 additions & 0 deletions apps/site/src/components/learn/lessons/TeeJaReisimine.drills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
import type { MessageDescriptor } from "@lingui/core";
import { msg } from "@lingui/core/macro";
import {
TRAVEL_ANSWERS,
TRAVEL_FIXES,
TRAVEL_FORMS,
TRAVEL_TELL,
TRAVEL_TRANSLATE,
} from "../../../lib/learn/clips";
import type { ChoiceDrill, DrillBank, FormDrill } from "../../../lib/learn/drill";

const TURN_RULE = msg`Turning toward a side takes <et>-le</et>: <et>Pöörake vasakule</et>, <et>Pöörake paremale</et>.`;
const SIDE_RULE = msg`Saying which side a place is on takes <et>-l</et>: <et>Kohvik on vasakul</et>, <et>Jaam on paremal</et>.`;
const TICKET_RULE = msg`Useful station phrases: <et>Kus on bussipeatus?</et>, <et>Palun üks pilet Tartusse.</et>, <et>Mis kell rong väljub?</et>`;

const FORM_GLOSS: Record<(typeof TRAVEL_FORMS)[number]["id"], MessageDescriptor> = {
"turn-left": msg`to the left`,
"turn-right": msg`to the right`,
"on-left": msg`on the left`,
"on-right": msg`on the right`,
"to-tartu": msg`to Tartu`,
straight: msg`straight ahead`,
};

const TELL_LABELS = {
turn: { id: "turn", label: msg`Turning (where to)` },
side: { id: "side", label: msg`Location (which side)` },
} as const;

const TRANS_PROMPTS: Record<(typeof TRAVEL_TRANSLATE)[number], MessageDescriptor> = {
"Kus on bussipeatus?": msg`Where is the bus stop?`,
"Palun üks pilet Tartusse.": msg`One ticket to Tartu, please.`,
"Minge otse edasi.": msg`Go straight ahead (polite).`,
"Pöörake vasakule.": msg`Turn left (polite).`,
"Jaam on paremal.": msg`The station is on the right.`,
"Mis kell rong väljub?": msg`What time does the train leave?`,
};

const FIX_PROMPTS: Record<(typeof TRAVEL_FIXES)[number]["id"], MessageDescriptor> = {
turnLeft: msg`Turn left!`,
turnRight: msg`Turn right!`,
onLeft: msg`The café is on the left.`,
onRight: msg`The station is on the right.`,
toTartu: msg`One ticket to Tartu, please.`,
whereStop: msg`Where is the bus stop?`,
};

const formSaid = (item: { before: string; answer: string; after: string }) =>
`${item.before} ${item.answer}${/^[.,!?]/.test(item.after) ? "" : " "}${item.after}`;

const formItem = (index: number): FormDrill => {
const item = TRAVEL_FORMS[index] as (typeof TRAVEL_FORMS)[number];
const rule = item.id === "to-tartu" ? "station" : item.id.startsWith("on-") ? "side" : "turn";
return {
kind: "form",
id: `form-${item.id}`,
rule,
base: item.base,
gloss: FORM_GLOSS[item.id],
cue: { et: `${item.before} ___${/^[.,!?]/.test(item.after) ? "" : " "}${item.after}` },
answers: [item.answer],
say: formSaid(item),
explain: rule === "station" ? TICKET_RULE : rule === "side" ? SIDE_RULE : TURN_RULE,
};
};

const tellItem = (index: number): ChoiceDrill => {
const item = TRAVEL_TELL[index] as (typeof TRAVEL_TELL)[number];
return {
kind: "choice",
id: `tell-${item.id}`,
rule: "side",
say: item.said,
answer: TELL_LABELS[item.kind],
wrong: [TELL_LABELS[item.kind === "turn" ? "side" : "turn"]],
explain: item.kind === "turn" ? TURN_RULE : SIDE_RULE,
};
};

const toAsciiId = (text: string) =>
text
.toLowerCase()
.replaceAll("ä", "a")
.replaceAll("ö", "o")
.replaceAll("ü", "u")
.replaceAll("õ", "o")
.replace(/[^a-z]+/g, "-")
.replace(/^-|-$/g, "");

export const DRILLS: DrillBank = {
rules: {
turn: { label: msg`Turning: <et>otse, vasakule, paremale</et>`, section: "directions" },
side: { label: msg`Location: <et>vasakul, paremal</et>`, section: "directions" },
station: { label: msg`At the station: <et>pilet, peatus, jaam</et>`, section: "write" },
},
items: [
formItem(0),
formItem(1),
formItem(2),
formItem(3),
formItem(4),
formItem(5),
tellItem(0),
tellItem(1),
tellItem(2),
tellItem(3),
tellItem(4),
tellItem(5),
...TRAVEL_TRANSLATE.map((said) => {
const rule =
said.includes("pilet") || said.includes("peatus") || said.includes("väljub")
? "station"
: said.includes("paremal")
? "side"
: "turn";
return {
kind: "translate" as const,
id: `write-${toAsciiId(said)}`,
rule: rule as "turn" | "side" | "station",
prompt: TRANS_PROMPTS[said],
answers: TRAVEL_ANSWERS[said],
say: said,
explain: rule === "station" ? TICKET_RULE : rule === "side" ? SIDE_RULE : TURN_RULE,
};
}),
...TRAVEL_FIXES.map((item) => {
const rule =
item.id === "toTartu" || item.id === "whereStop"
? "station"
: item.id.startsWith("on")
? "side"
: "turn";
return {
kind: "fix" as const,
id: `fix-${item.id.toLowerCase()}`,
rule: rule as "turn" | "side" | "station",
wrong: item.wrong,
prompt: FIX_PROMPTS[item.id],
answers: [item.right] as readonly [string, ...string[]],
say: item.right,
explain: rule === "station" ? TICKET_RULE : rule === "side" ? SIDE_RULE : TURN_RULE,
};
}),
],
};
Loading
Loading