mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 17:38:45 +00:00
Offer Paradee Heart alongside Kokoro voices in the existing bundled TTS plugin. Default unconfigured settings to Paradee while preserving saved Kokoro voices, blends, speed and activation choices. Switching engines replaces the voice selection without a separate plugin or startup dialog. Add lazy CPU ONNX synthesis with cached, pinned model assets and split long input without dropping phonemes. Make status and preload follow the selected engine, and present both engines through the Local TTS UI. Prepare Paradee dependencies in hooks.py on plugin install/update, enabled-plugin startup and re-enable. Reuse installed packages, preserve browser fallback on setup failure and keep requirements.txt unchanged. Update plugin documentation and regression coverage. Validation: 44 focused tests passed in both host and Docker framework runtimes. Live synthesis and voice-picker switching passed on localhost:32081. git diff --check passed. Fresh-image builds and actual missing-package installation were not tested.
137 lines
3.8 KiB
HTML
137 lines
3.8 KiB
HTML
<html>
|
|
<head>
|
|
<title>Local TTS</title>
|
|
<script type="module">
|
|
import { store } from "/plugins/_kokoro_tts/webui/kokoro-tts-store.js";
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div
|
|
x-data
|
|
x-init="$store.kokoroTts.ensureStatusLoaded()"
|
|
class="speech-plugin-page"
|
|
>
|
|
<template x-if="$store.kokoroTts">
|
|
<div>
|
|
<div class="section-title">Local TTS</div>
|
|
<div class="section-description">
|
|
Local speech synthesis with Paradee or Kokoro. Disabling this plugin
|
|
returns spoken output to the browser fallback.
|
|
</div>
|
|
|
|
<div class="speech-plugin-grid">
|
|
<div class="speech-plugin-card">
|
|
<div class="field-title">Provider State</div>
|
|
<div class="status-row">
|
|
<span class="status-key">Enabled</span>
|
|
<span class="status-badge" :class="$store.kokoroTts.enabled ? 'ok' : 'warn'" x-text="$store.kokoroTts.enabled ? 'Yes' : 'No'"></span>
|
|
</div>
|
|
<div class="status-row">
|
|
<span class="status-key">Model</span>
|
|
<span class="status-value" x-text="$store.kokoroTts.modelName"></span>
|
|
</div>
|
|
<div class="status-row">
|
|
<span class="status-key">State</span>
|
|
<span class="status-badge" :class="$store.kokoroTts.statusClass" x-text="$store.kokoroTts.statusText"></span>
|
|
</div>
|
|
<div class="status-row" x-show="$store.kokoroTts.packageVersion">
|
|
<span class="status-key">Package</span>
|
|
<span class="status-value" x-text="$store.kokoroTts.packageVersion"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="speech-plugin-card">
|
|
<div class="field-title">Resolved Config</div>
|
|
<div class="status-row">
|
|
<span class="status-key">Voice</span>
|
|
<span class="status-value mono" x-text="$store.kokoroTts.voiceSummary"></span>
|
|
</div>
|
|
<div class="status-row">
|
|
<span class="status-key">Speed</span>
|
|
<span class="status-value" x-text="$store.kokoroTts.config.speed"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="speech-plugin-actions">
|
|
<button class="btn btn-field" @click="$store.kokoroTts.openConfig()">Open Settings</button>
|
|
<button class="btn btn-field" @click="$store.kokoroTts.refreshStatus()">Refresh</button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<style>
|
|
.speech-plugin-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 14px;
|
|
}
|
|
|
|
.speech-plugin-grid {
|
|
display: grid;
|
|
gap: 12px;
|
|
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
}
|
|
|
|
.speech-plugin-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
padding: 14px;
|
|
background: var(--color-input);
|
|
}
|
|
|
|
.speech-plugin-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.status-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
font-size: 0.84rem;
|
|
}
|
|
|
|
.status-key {
|
|
opacity: 0.7;
|
|
min-width: 64px;
|
|
}
|
|
|
|
.status-value {
|
|
text-align: right;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.status-badge {
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
font-size: 0.76rem;
|
|
font-weight: 600;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.status-badge.ok {
|
|
color: #1b5e20;
|
|
background: rgba(46, 125, 50, 0.14);
|
|
border-color: rgba(46, 125, 50, 0.24);
|
|
}
|
|
|
|
.status-badge.warn {
|
|
color: #8a6100;
|
|
background: rgba(191, 144, 0, 0.14);
|
|
border-color: rgba(191, 144, 0, 0.24);
|
|
}
|
|
|
|
.mono {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.78rem;
|
|
}
|
|
</style>
|
|
</body>
|
|
</html>
|