Rework sound effects and add pre-generated Piper narration

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
denis
2026-10-16 12:29:51 +02:00
parent 61eccb2f80
commit 7050cb1ac6
60 changed files with 918 additions and 83 deletions
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.
+38
View File
@@ -0,0 +1,38 @@
{
"en": {
"3377dbceba2bc0b7": {
"text": "A program is a list of instructions. The computer reads them one by one, from top to bottom.",
"voice": "en_US-ljspeech-high"
},
"430223b95c3fa880": {
"text": "The computer guesses nothing. It does exactly what you write, nothing more. That is why we must be precise.",
"voice": "en_US-ljspeech-high"
},
"b076ad3710ea6882": {
"text": "Python is a language for writing these instructions. In the next level, you write your first line.",
"voice": "en_US-ljspeech-high"
},
"d9f081c67f104001": {
"text": "Like a recipe: 1. Crack the eggs. 2. Beat the eggs. 3. Cook the omelette. Change the order and the result changes.",
"voice": "en_US-ljspeech-high"
}
},
"fr": {
"01f59f4dd745df14": {
"text": "Python est un langage pour écrire ces instructions. Dans le prochain niveau, tu écris ta première ligne.",
"voice": "fr_FR-siwis-medium"
},
"057035f93c3e455c": {
"text": "L'ordinateur ne devine rien. Il fait exactement ce que tu écris, rien de plus. C'est pour ça qu'on doit être précis.",
"voice": "fr_FR-siwis-medium"
},
"52435bdffec79d76": {
"text": "Comme une recette : 1. Casser les œufs. 2. Battre les œufs. 3. Cuire l'omelette. Si tu changes l'ordre, le résultat change.",
"voice": "fr_FR-siwis-medium"
},
"b691d6ad0208b825": {
"text": "Un programme est une liste d'instructions. L'ordinateur les lit une par une, de haut en bas.",
"voice": "fr_FR-siwis-medium"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+22
View File
@@ -0,0 +1,22 @@
{
"en": {
"6bb0749a98111d4b": {
"text": "print() shows text on the screen. The text goes between quotes, inside the parentheses.",
"voice": "en_US-ljspeech-high"
},
"a5c2adba55f3c70c": {
"text": "Text between quotes is called a string. Each print() writes on a new line.",
"voice": "en_US-ljspeech-high"
}
},
"fr": {
"54eb6e343fdd61b5": {
"text": "print() affiche du texte à l'écran. Le texte va entre guillemets, dans les parenthèses.",
"voice": "fr_FR-siwis-medium"
},
"eb34bc4286d352bc": {
"text": "Un texte entre guillemets s'appelle une chaîne de caractères. Chaque print() écrit sur une nouvelle ligne.",
"voice": "fr_FR-siwis-medium"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
{
"en": {
"1e3d9deb4223b3ec": {
"text": "There are several types. str: text (\"cat\"). int: a whole number (7). float: a decimal number (3.14, with a dot).",
"voice": "en_US-ljspeech-high"
},
"53c913acebcde4f6": {
"text": "A variable is a box with a name. You put a value in it: age = 12. The = sign stores the value in the box.",
"voice": "en_US-ljspeech-high"
},
"a7bc4151dfb8b449": {
"text": "You can calculate with variables: total = price * 3. A variable can also be reassigned later.",
"voice": "en_US-ljspeech-high"
}
},
"fr": {
"34140c6135df449f": {
"text": "Une variable est une boîte avec un nom. Tu y ranges une valeur : age = 12. Le signe = range la valeur dans la boîte.",
"voice": "fr_FR-siwis-medium"
},
"a631adfba4ea98e4": {
"text": "Il existe plusieurs types. str : du texte (\"chat\"). int : un nombre entier (7). float : un nombre à virgule (3.14, avec un point).",
"voice": "fr_FR-siwis-medium"
},
"b01fc242e75a475e": {
"text": "Tu peux calculer avec des variables : total = price * 3. Une variable peut aussi être réaffectée plus tard.",
"voice": "fr_FR-siwis-medium"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
{
"en": {
"5001c3ed998b7d08": {
"text": "Careful: input() always returns text (str), even if you type a number. To calculate, convert with int() for a whole number.",
"voice": "en_US-ljspeech-high"
},
"9b1fde4f226e7312": {
"text": "For a decimal number, use float(). Write the number with a dot: 2.5.",
"voice": "en_US-ljspeech-high"
},
"b6ee93b31ce24973": {
"text": "input() asks a question and waits for an answer. What you type is stored in a variable.",
"voice": "en_US-ljspeech-high"
}
},
"fr": {
"10106ac3ec9e360e": {
"text": "Pour un nombre à virgule, utilise float(). Écris le nombre avec un point : 2.5.",
"voice": "fr_FR-siwis-medium"
},
"93d150defcc1afd3": {
"text": "Attention : input() renvoie toujours du texte (str), même si tu tapes un nombre. Pour calculer, convertis avec int() pour un entier.",
"voice": "fr_FR-siwis-medium"
},
"f78f76c20364c000": {
"text": "input() pose une question et attend une réponse. Ce que tu tapes est rangé dans une variable.",
"voice": "fr_FR-siwis-medium"
}
}
}
+26
View File
@@ -0,0 +1,26 @@
# Crédits audio / Audio credits
La narration des niveaux est **pré-générée** par synthèse vocale (`make voice`, script
`scripts/generate_voice.py`) ; les fichiers `levels/*/audio/**/*.mp3` et
`app/assets/voice/**/*.mp3` en sont le résultat. Les effets sonores de l'interface sont
synthétisés dans le navigateur (`app/js/core/AudioEngine.js`) et ne reprennent aucun échantillon.
Narration is **pre-generated** with speech synthesis (`make voice`). UI sound effects are
synthesized in the browser and use no samples.
## Moteur / Engine
- [Piper](https://github.com/OHF-Voice/piper1-gpl) (GPL-3.0-or-later), utilisé **uniquement comme
outil de build** : il n'est pas embarqué dans l'application, seuls les fichiers audio produits
sont distribués. Piper is used as a build tool only; it is not shipped with the app.
## Voix / Voices (modèles de [rhasspy/piper-voices](https://huggingface.co/rhasspy/piper-voices))
| Langue | Voix | Jeu de données | Licence | Attribution |
|---|---|---|---|---|
| fr | `fr_FR-siwis-medium` | [SIWIS French Speech Synthesis Database](https://datashare.is.ed.ac.uk/handle/10283/2353), University of Edinburgh | CC BY 4.0 | Voix issue de la base SIWIS (Honnet et al., University of Edinburgh), licence CC BY 4.0 : https://creativecommons.org/licenses/by/4.0/ |
| en | `en_US-ljspeech-high` | [LJ Speech](https://keithito.com/LJ-Speech-Dataset/) | Domaine public | — |
Vérifier le `MODEL_CARD` d'une voix avant d'en changer : certaines voix Piper sont sous licence
non commerciale (ex. `en_US-hfc_female-medium`, CC BY-NC-SA) ou copyleft (ex. `fr_FR-tom-medium`,
AGPLv3) et ne conviennent pas à ce projet.