diff --git a/docs/POCKET_TTS.md b/docs/POCKET_TTS.md index d4f585d..7c54a4e 100644 --- a/docs/POCKET_TTS.md +++ b/docs/POCKET_TTS.md @@ -111,3 +111,13 @@ CPU policy, voice path isolation, TTS formats, profile identities/presets and configuration backup/restore passed. Existing chat tests also fail at unchanged HEAD with `worker_unavailable`; they are not represented as passing. Final publication and client/API observations are recorded in the integration evidence. + +## Current selection + +On17 October2026 the regular UI created and published **Pocket Anna**, API-ID +`pocket-anna`, with its German tokenizer and the existing Anna default voice. +Hermes now sends model `tts` to its unchanged Athena speech URL. OmniVoice's +old speech publication is disabled; its profile and weights are retained. +Actual WAV, MP3 and PCM calls returned200 with unchanged Strata GPU processes. +Detailed activation, profile/UI, config-preservation and API evidence: +[Integration acceptance](experiments/pocket-integration-2026-10-17/README.md). diff --git a/docs/experiments/pocket-integration-2026-10-17/README.md b/docs/experiments/pocket-integration-2026-10-17/README.md index 877c0cc..2f34f1f 100644 --- a/docs/experiments/pocket-integration-2026-10-17/README.md +++ b/docs/experiments/pocket-integration-2026-10-17/README.md @@ -25,11 +25,32 @@ Pocket catalogue sources included. The userdata inventory now includes `speech-voices` and `pocket-jobs`; no backup key or private media was displayed. No full fresh-host native restore was performed. -At this checkpoint regular Deck login is pending. No Pocket profile or endpoint -publication is claimed yet. Hermes continues to request `omnivoice-studio` at the -existing Athena address. After GUI profile creation/component assignment and -publication, change only Hermes's TTS model setting to `tts` using its existing -config persistence function; keep URL, credential and voice default. Then test -WAV/MP3/PCM through the real API and check normal browser playback. +Completed through the regular signed-in Deck UI: created `Pocket Anna`, API-ID +`pocket-anna`, assigned the pinned German tokenizer and enabled its endpoint +publication. Disabled only the old `OmniVoice Studio` speech publication; +Qwen-TTS remains disabled, other service/model publications unchanged. The TTS +Test tab generated a new Anna WAV successfully using Pocket on CPU. + +Hermes's official `_save_yaml_config_file` persistence path changed only +`tts.openai.model` from `omnivoice-studio` to the neutral `tts`. Full parsed +configuration equality after reverting that single field confirmed that all +other saved settings, base URL, credentials, default voice and profiles remained +unchanged. The endpoint remains `http://192.168.1.212:8120/v1`; no Hermes code or +container restart. A fresh config read confirms model=tts and voice=default. + +During GUI acceptance the conservative execution-family recognizer still showed +old generic TTS text. Added the explicit pinned Pocket family/runtime mapping, +CPU runtime discovery and removed the obsolete speech501 help text. A final idle +app update applied these display changes; persisted profiles/publications/audio +policy were hash-checked unchanged and Strata512K reloaded again. Final image and +restoration are in `activation-ui.json`. An additional25 local Pocket/policy/ +execution-recognition tests passed (overlaps earlier70; not95 distinct tests). + +Final real API test via model=tts: WAV200 in2.134s, MP3200 in1.953s, +PCM200 first bytes0.199s / total1.895s. GPU processes unchanged across all three. +See `endpoint-test.json`. The MP3 fully decodes with FFmpeg. Local STT output for +the actual endpoint WAV is stored when available. Existing profile, publication, +tokenizer assignment and CPU recognition were independently verified after the +last restart. No active production request was interrupted. Native implementation and repeatable configuration: [Pocket TTS](../../POCKET_TTS.md). diff --git a/docs/experiments/pocket-integration-2026-10-17/activation-ui.json b/docs/experiments/pocket-integration-2026-10-17/activation-ui.json new file mode 100644 index 0000000..96ac525 --- /dev/null +++ b/docs/experiments/pocket-integration-2026-10-17/activation-ui.json @@ -0,0 +1,7 @@ +{ + "image": "athena-deck-standalone:00d8d42f29977b2d", + "settings_unchanged": true, + "deck_ready": true, + "previous_model": "flash-next-strata-iq3-512k", + "previous_model_restored": true +} \ No newline at end of file diff --git a/docs/experiments/pocket-integration-2026-10-17/endpoint-test.json b/docs/experiments/pocket-integration-2026-10-17/endpoint-test.json new file mode 100644 index 0000000..93f0e9d --- /dev/null +++ b/docs/experiments/pocket-integration-2026-10-17/endpoint-test.json @@ -0,0 +1,24 @@ +{ + "wav": { + "status": 200, + "content_type": "audio/wav", + "bytes": 272684, + "first_bytes_seconds": 2.1335492609941866, + "total_seconds": 2.134238723985618 + }, + "mp3": { + "status": 200, + "content_type": "audio/mpeg", + "bytes": 80301, + "first_bytes_seconds": 1.9524406520067714, + "total_seconds": 1.9527768419939093 + }, + "pcm": { + "status": 200, + "content_type": "audio/pcm", + "bytes": 245760, + "first_bytes_seconds": 0.1991302079986781, + "total_seconds": 1.895290890999604 + }, + "gpu_processes_unchanged": true +} \ No newline at end of file diff --git a/docs/experiments/pocket-integration-2026-10-17/endpoint-transcription.json b/docs/experiments/pocket-integration-2026-10-17/endpoint-transcription.json new file mode 100644 index 0000000..403a6dc --- /dev/null +++ b/docs/experiments/pocket-integration-2026-10-17/endpoint-transcription.json @@ -0,0 +1,3 @@ +{ + "text": "Hallo Michael! Anna spricht jetzt über Pocket Teals direkt aus deinem Athena-Deck." +} \ No newline at end of file diff --git a/endpoint-ui.js b/endpoint-ui.js index fda1a0e..32eea39 100644 --- a/endpoint-ui.js +++ b/endpoint-ui.js @@ -47,7 +47,7 @@ window.EndpointUI=(()=>{ async function render(settings=false){ const view=document.querySelector('#view');let root=view.querySelector('#endpoint-page'); if(!root||root.dataset.settings!==String(settings)){ - sequence++;clearTimeout(controlTimer);selectedMode=null;view.innerHTML=`
${settings?'EINSTELLUNGEN / API':'ATHENA DECK / ROUTER'}

${settings?'Endpunkt':'Steuerung'}

${settings?'

API-Port und freigegebene Profile verwalten.

':'

Betriebsart wählen und starten.

'}

${settings?'

Lokaler API-Port

Der Zugriff verwendet den API-Token aus Zugang & API-Token. Verwaltungsoberfläche und API haben getrennte Ports.

Zusätzliche API-Kompatibilität

Für lokale Work-/Codex-Aufgaben in der ChatGPT-App und andere Responses-Clients. Verwendet denselben API-Port, Token und die freigegebenen Chat-Profile. Die Chat-Completions-API bleibt verfügbar.

Unterstützt Text, Streaming und Werkzeugaufrufe. Gesprächskontext muss vollständig mitgesendet werden. Keine gespeicherten Antworten, WebSocket-Fortsetzung oder gehosteten OpenAI-Werkzeuge. Umschalten ist ohne Modell-Neustart möglich; laufende Anfragen werden beendet.

Am Endpunkt angebotene Profile

Nur explizit aktivierte, ausführbare Profile erscheinen in GET /v1/models. Aktivieren lädt noch kein Modell.

API-Routen

POST /v1/chat/completions · Text und Streaming
POST /v1/responses · optional über den Kompatibilitätsschalter
POST /v1/images/generations · Qwen-Image-Rezept, ein Bild als b64_json
POST /v1/audio/speech und POST /v1/audio/transcriptions · noch nicht eingerichtet (501)

Alle Routen nutzen denselben Port und Bearer-Token. Bei Bildaufträgen bestimmt das Profil Auflösung, Schritte, Guidance und Seed. Noch keine Bildbearbeitung oder Vision-Eingaben.

':''}
`; + sequence++;clearTimeout(controlTimer);selectedMode=null;view.innerHTML=`
${settings?'EINSTELLUNGEN / API':'ATHENA DECK / ROUTER'}

${settings?'Endpunkt':'Steuerung'}

${settings?'

API-Port und freigegebene Profile verwalten.

':'

Betriebsart wählen und starten.

'}

${settings?'

Lokaler API-Port

Der Zugriff verwendet den API-Token aus Zugang & API-Token. Verwaltungsoberfläche und API haben getrennte Ports.

Zusätzliche API-Kompatibilität

Für lokale Work-/Codex-Aufgaben in der ChatGPT-App und andere Responses-Clients. Verwendet denselben API-Port, Token und die freigegebenen Chat-Profile. Die Chat-Completions-API bleibt verfügbar.

Unterstützt Text, Streaming und Werkzeugaufrufe. Gesprächskontext muss vollständig mitgesendet werden. Keine gespeicherten Antworten, WebSocket-Fortsetzung oder gehosteten OpenAI-Werkzeuge. Umschalten ist ohne Modell-Neustart möglich; laufende Anfragen werden beendet.

Am Endpunkt angebotene Profile

Nur explizit aktivierte, ausführbare Profile erscheinen in GET /v1/models. Aktivieren lädt noch kein Modell.

API-Routen

POST /v1/chat/completions · Text und Streaming
POST /v1/responses · optional über den Kompatibilitätsschalter
POST /v1/images/generations · Qwen-Image-Rezept, ein Bild als b64_json
POST /v1/audio/speech und POST /v1/audio/transcriptions · freigegebene Sprachprofile

Alle Routen nutzen denselben Port und Bearer-Token. Für TTS kann der feste Modellname tts verwendet werden; dafür genau ein TTS-Profil freigeben. Bei Bildaufträgen bestimmt das Profil Auflösung, Schritte, Guidance und Seed. Noch keine Bildbearbeitung oder Vision-Eingaben.

':''}
`; root=view.querySelector('#endpoint-page'); if(settings)for(const action of ['start','stop'])root.querySelector('#endpoint-'+action).onclick=()=>mutate('/'+action,{}); root.querySelector('#endpoint-responses')?.addEventListener('change',event=>mutate('/config',{responses_compat:event.target.checked})); diff --git a/execution_setup.py b/execution_setup.py index 619969b..1eda130 100644 --- a/execution_setup.py +++ b/execution_setup.py @@ -13,6 +13,12 @@ def _assess(model, installed, profile=None): if not file_role(filename)['profile_eligible']: result.update(state='component',label='Zusatzdatei',message='Diese Datei wird einem kompatiblen Modellprofil zugeordnet und benötigt keine eigene Laufzeit.') return result + from pocket_runtime import supported as pocket_model + if pocket_model(model): + ready=bool(installed.get('pocket')) + result.update(family='Pocket TTS · Deutsch',evidence='Gepinntes deutsches Kyutai-Klonmodell',runtime='Pocket TTS · CPU',route='#tts-runtime',installed=ready,state='setup' if ready else 'runtime_missing',label='Pocket TTS · CPU',components=['Deutscher Text-Tokenizer','Gespeicherte Pocket-Stimme'],message='CPU-TTS mit gespeicherter Anna-Stimme. Kein GPU-Speicher und kein Entladen des Sprachmodells. Unter TTS → Testen verwenden.') + if profile:result.update(state='ready' if profile.get('runnable') else 'profile_incomplete',blockers=profile.get('blockers',[])) + return result from soulx_singer import soulx_singer_model if soulx_singer_model(model): result.update(family='SoulX-Singer',evidence='Originales 24-kHz-Gesangsmodell',runtime='SoulX-Singer · Python/PyTorch',route='#soulx-singer-runtime',installed=bool(installed.get('soulx_singer')),state='ready' if installed.get('soulx_singer') else 'setup',label='SoulX-Singer Gesang',message='Gesangsaufnahme und Referenzstimme verwenden; kein Stimmtraining nötig.') @@ -89,6 +95,10 @@ def _assess_candidates(model, installed, profile=None): meta=model.get('runtime_metadata') or {};family=str(meta.get('architecture') or '').lower() def add(id,label,key,route,reason,maintained=True): result['candidates'].append(dict(id=id,label=label,installed=bool(installed.get(key)),route=route,installation_available=maintained,evidence=reason)) + from pocket_runtime import supported as pocket_model + if pocket_model(model): + add('pocket','Pocket TTS · CPU','pocket','#tts-runtime','Gepinnter originaler Kyutai-CPU-Worker') + return result from soulx_singer import soulx_singer_model if soulx_singer_model(model): result.update(family='SoulX-Singer',evidence='Originales 24-kHz-Gesangsmodell',runtime='SoulX-Singer · Python/PyTorch',route='#soulx-singer-runtime',installed=bool(installed.get('soulx_singer')),state='ready' if installed.get('soulx_singer') else 'setup',label='SoulX-Singer Gesang',message='Gesangsaufnahme und Referenzstimme verwenden; kein Stimmtraining nötig.') diff --git a/server.py b/server.py index 653d9b5..bfca8bf 100644 --- a/server.py +++ b/server.py @@ -443,7 +443,7 @@ class Handler(BaseHTTPRequestHandler): else self.server.video.runtime) return {'embeddings':chat,'stt':chat,'chat':chat, 'image':self.server.image_runtime.status().get('installed',False), - 'audio':self.server.tts_runtime.status().get('installed',False),'parakeet':self.server.stt.parakeet.status()['installed'], + 'pocket':self.server.pocket_runtime.status()['installed'],'audio':self.server.tts_runtime.status().get('installed',False),'parakeet':self.server.stt.parakeet.status()['installed'], 'video':video_runtime.status().get('installed',False), 'acestep':self.server.acestep_runtime.status()['installed'], 'audio_cpp':self.server.audio_cpp_runtime.status()['installed'], diff --git a/test_pocket.py b/test_pocket.py index e68a58f..808c09b 100644 --- a/test_pocket.py +++ b/test_pocket.py @@ -8,6 +8,11 @@ from endpoint import APIHandler,APIError MODEL=dict(kind='audio',repo='kyutai/pocket-tts',revision=MODEL_REVISION,file='languages/german/model.safetensors') class PocketTests(unittest.TestCase): + def test_execution_ui_recognizes_installed_cpu_profile(self): + from execution_setup import assess + r=assess(MODEL,{'pocket':True},{'runnable':True,'blockers':[]}) + self.assertEqual(r['state'],'ready');self.assertIn('Pocket',r['family']);self.assertTrue(r['installed']) + self.assertEqual(r['candidates'][0]['id'],'pocket') def test_private_voice_scope_and_explicit_errors(self): with tempfile.TemporaryDirectory() as d: root=Path(d);voice=root/'speech-voices/Anna';voice.mkdir(parents=True)