Add ttstoy cog

This commit is contained in:
2026-06-05 16:41:55 -05:00
parent 0e9f4a5224
commit 6739b2d6f1
975 changed files with 8216 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
{% extends "base.html" %}
{% block title %}Profile — TtsToy{% endblock %}
{% block content %}
<div style="margin-bottom:1.25rem;">
<h1 style="font-size:1rem;font-weight:300;color:#e0ecff;text-transform:uppercase;letter-spacing:2px;text-shadow:0 0 16px rgba(80,150,255,0.2);">Profile</h1>
</div>
<div class="card">
<h2>Discord</h2>
<div style="display:flex;align-items:center;gap:1rem;margin-bottom:1rem;">
{% if session.get('avatar_url') %}
<img src="{{ session.avatar_url }}" style="width:52px;height:52px;border-radius:50%;border:2px solid rgba(80,120,180,0.3);">
{% endif %}
<div>
<div style="font-size:1rem;font-weight:300;color:#c8daf0;">{{ session.get('discord_name', 'Unknown') }}</div>
<div class="muted">ID: {{ session.get('user_id') }}</div>
</div>
</div>
{% if user_info %}
<table>
{% for k, v in user_info.items() %}
<tr><td style="color:rgba(140,180,230,0.4);width:40%;">{{ k }}</td><td>{{ v }}</td></tr>
{% endfor %}
</table>
{% else %}
<div class="muted">No additional info available from the bot yet.</div>
{% endif %}
</div>
<div class="card">
<h2>TtsToy Settings</h2>
<table>
<tr>
<td style="color:rgba(140,180,230,0.4);width:40%;">Active Voice</td>
<td>
{% if ucfg.get('minimax_voice') %}
{% set v = ucfg.minimax_voice %}
{{ v.split('_',1)[1].rsplit('.',1)[0] if '_' in v else v }}
{% else %}
<span class="muted">Global default</span>
{% endif %}
</td>
</tr>
<tr>
<td style="color:rgba(140,180,230,0.4);">Uploaded Voices</td>
<td>{{ ucfg.get('chatterbox_voices', []) | length }}</td>
</tr>
<tr>
<td style="color:rgba(140,180,230,0.4);">Global TTS Mode</td>
<td><span class="badge badge-mode">{{ gcfg.get('tts_mode','minimax').upper() }}</span></td>
</tr>
<tr>
<td style="color:rgba(140,180,230,0.4);">SFX Volume</td>
<td>{{ gcfg.get('sfx_volume', 100) }}%</td>
</tr>
<tr>
<td style="color:rgba(140,180,230,0.4);">Accessibility Mode</td>
<td>{{ 'On' if gcfg.get('accessibility_mode') else 'Off' }}</td>
</tr>
</table>
</div>
{% if ucfg.get('chatterbox_voices') %}
<div class="card">
<h2>Per-Voice Settings</h2>
<table>
<thead><tr><th>Voice</th><th>Temp</th><th>Exag</th><th>Vol dB</th><th>Speed</th></tr></thead>
<tbody>
{% for v in ucfg.get('chatterbox_voices', []) %}
{% set display = v.split('_',1)[1].rsplit('.',1)[0] if '_' in v else v %}
<tr>
<td style="color:#c8daf0;">{{ display }}</td>
<td>{{ ucfg.get('chatterbox_temperature_offsets',{}).get(v, '—') }}</td>
<td>{{ ucfg.get('chatterbox_exaggeration_offsets',{}).get(v, '—') }}</td>
<td>{{ ucfg.get('chatterbox_volume_offsets',{}).get(v, '—') }}</td>
<td>{{ ucfg.get('chatterbox_speed_offsets',{}).get(v, '—') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}