Files
Athena-Deck/deploy/applio-web/backend/app/services/presets.py
T
Mikei386 06cacafbad Add native Applio RVC and preserve the custom studio UI
Pin Applio 3.6.5 and verified basis assets, migrate private voice provenance, and coordinate conversion/live/training with Deck GPU leases. Prepare an inactive voice profile and a restricted studio container. Move CUDA and Torch caches out of the small temporary filesystem to prevent OmniVoice reference failures. Package app updates from the explicit allowlist in one Docker layer.
2026-10-05 10:02:07 +02:00

129 lines
3.4 KiB
Python

"""Preset definitions for voice conversion."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any
@dataclass
class Preset:
id: str
name: str
description: str
parameters: dict[str, Any] = field(default_factory=dict)
PRESETS: list[Preset] = [
Preset(
id="sprache-neutral",
name="Sprache, neutral",
description="Natürliche Sprachumwandlung mit ausgewogenen Einstellungen",
parameters={
"pitch": 0,
"f0_method": "rmvpe",
"index_rate": 0.3,
"protect": 0.33,
"volume_envelope": 1.0,
"export_format": "WAV",
},
),
Preset(
id="sprache-hohe-qualitaet",
name="Sprache, hohe Qualität",
description="Maximale Qualität mit stärkerem Index-Einfluss",
parameters={
"pitch": 0,
"f0_method": "rmvpe",
"index_rate": 0.5,
"protect": 0.33,
"volume_envelope": 1.0,
"export_format": "FLAC",
},
),
Preset(
id="gesang",
name="Gesang",
description="Optimiert für Gesangsaufnahmen mit Autotune",
parameters={
"pitch": 0,
"f0_method": "rmvpe",
"index_rate": 0.4,
"protect": 0.2,
"volume_envelope": 1.0,
"f0_autotune": True,
"f0_autotune_strength": 0.5,
"export_format": "WAV",
},
),
Preset(
id="schnelle-vorschau",
name="Schnelle Vorschau",
description="Schnellste Umwandlung für eine erste Hörprobe",
parameters={
"pitch": 0,
"f0_method": "crepe-tiny",
"index_rate": 0.2,
"protect": 0.33,
"volume_envelope": 1.0,
"export_format": "MP3",
},
),
Preset(
id="maenner-zu-frauen",
name="Männerstimme zu Frauenstimme",
description="Erhöht die Stimmlage um 12 Halbtöne (eine Oktave)",
parameters={
"pitch": 12,
"f0_method": "rmvpe",
"index_rate": 0.4,
"protect": 0.3,
"volume_envelope": 1.0,
"export_format": "WAV",
},
),
Preset(
id="frauen-zu-maennern",
name="Frauenstimme zu Männerstimme",
description="Senkt die Stimmlage um 12 Halbtöne (eine Oktave)",
parameters={
"pitch": -12,
"f0_method": "rmvpe",
"index_rate": 0.4,
"protect": 0.3,
"volume_envelope": 1.0,
"export_format": "WAV",
},
),
Preset(
id="gleiche-stimmlage",
name="Gleiche Stimmlage",
description="Nur Timbre-Wechsel ohne Tonhöhenänderung",
parameters={
"pitch": 0,
"f0_method": "rmvpe",
"index_rate": 0.5,
"protect": 0.33,
"volume_envelope": 1.0,
"export_format": "WAV",
},
),
Preset(
id="benutzerdefiniert",
name="Benutzerdefiniert",
description="Alle Einstellungen manuell anpassen",
parameters={},
),
]
def get_presets() -> list[dict[str, Any]]:
return [p.__dict__ for p in PRESETS]
def get_preset(preset_id: str) -> Preset | None:
for p in PRESETS:
if p.id == preset_id:
return p
return None