Sync while working on OT
All checks were successful
Deploy Docs / build-and-deploy (push) Successful in 12s

This commit is contained in:
2026-02-18 14:37:32 +01:00
parent 07127fb074
commit 1a589e104c
24 changed files with 616 additions and 518 deletions

View File

@@ -145,13 +145,16 @@ class AudioBuilder:
parts = []
for i, txt in enumerate(numbers):
# Jede Zahl als temporäres Asset durch die Standard-Pipeline jagen
# Wir nutzen eine interne ID, um Kollisionen im Preview-Ordner zu vermeiden
part_id = f"cnt_tmp_{i}"
part_file = self.process_asset(part_id, txt, voice, filters)
temp_asset = {
'id': part_id,
'text': txt
}
part_file = self.process_asset(temp_asset, voice, filters)
parts.append(part_file)
# Binäres Zusammenfügen (Da s16le keinen Header hat)
with open(final_cache_file, 'wb') as outfile:
for p_file in parts:
with open(p_file, 'rb') as infile:
@@ -166,6 +169,19 @@ class AudioBuilder:
out_dir = self.config['paths']['output']
out_dir.mkdir(parents=True, exist_ok=True)
countdown_file = Path("countdown.yaml")
if countdown_file.exists():
with open(countdown_file, "r") as f:
cnt_config = yaml.safe_load(f)
# Prüfen, ob der Countdown für das aktuelle Target gebaut werden soll
if target_name in cnt_config.get('targets', []):
# Aufruf der generierenden Methode
countdown_cache = self.generate_countdown(cnt_config)
# Kopieren ins lfs_source Verzeichnis unter dem Namen der ID ("countdown")
dest_file = out_dir / cnt_config['id']
shutil.copy(countdown_cache, dest_file)
for cfg_file in Path(".").glob("*.yaml"):
if cfg_file.name in ["global.yaml", "countdown.yaml"]:
continue
@@ -195,4 +211,4 @@ class AudioBuilder:
if __name__ == "__main__":
import sys
target = sys.argv[1] if len(sys.argv) > 1 else "vest"
AudioBuilder().build_target(target)
AudioBuilder().build_target(target)

View File

@@ -1,4 +1,4 @@
- id: "game_start"
- id: "siren"
type: "sample" # Neu: Unterscheidung zwischen TTS und Datei
source: "horn.ogg" # Die Datei in deinem samples/ Ordner
targets: ["vest", "base"]

View File

@@ -1,2 +1,7 @@
#!/usr/bin/env bash
nrfjprog -s 1050225991 --program lfs_external_flash.hex --qspisectorerase --verify --fast --reset --clockspeed 12000
JLINKS=$(nrfjprog -i)
for s in $JLINKS
do
echo "Programming $s"
nrfjprog -s $s --program lfs_external_flash.hex --qspisectorerase --verify --fast --reset --clockspeed 12000
done