# Locuciones / Public Announcement System

## Castellano

Opciones → Locuciones: escribe el texto y elige Femenina o Masculina. Con /idioma ESP se usan Sara Martín y David Martín en castellano de España (es-ES); con /idioma ENG se usan Cassidy y James en inglés nativo (en-US). Pulsa Emitir locución. ElevenLabs genera el audio una sola vez con Eleven v4 a 44,1 kHz y 192 kbps (máxima salida del plan Creator); el navegador lo reproduce una vez. Requiere sesión autorizada de admira.store/XpaceOS y consume créditos en la generación, no en la reproducción. La opción Voz local del navegador sigue siendo gratuita y usa es-ES o en-US según el idioma. La locución suena una sola vez, sin contador de repeticiones; Detener cancela la generación local pendiente y las repeticiones. La elección de género se recuerda en este navegador. Cambiar el idioma detiene la lectura en curso y actualiza ambas voces sin borrar el texto. La música baja durante la reproducción y recupera su volumen al terminar, detener o fallar. El texto se conserva al cambiar de idioma. Un fallo o audio silenciado se muestra como error, sin confirmar emisión ni sustituir silenciosamente la voz. Es reproducción local en la tienda virtual; no emite a tiendas físicas. /comunicar y /aviso conservan su función.

1. Abre Opciones → Locuciones.
2. Elige Sara Martín o David Martín.
3. Escribe hasta 1500 caracteres y pulsa Emitir locución. Si se pide sesión, usa Iniciar sesión y vuelve al gemelo.
4. Espera la preparación y la lectura, o pulsa Detener.

## English

Options → Public Announcement System: enter the text and choose Female or Male. With /idioma ENG, Cassidy and James speak native English (en-US); with /idioma ESP, Sara Martín and David Martín speak Castilian Spanish from Spain (es-ES). Then press Make Announcement. ElevenLabs generates the audio once with Eleven v4 at 44.1 kHz and 192 kbps (the maximum output for the Creator plan); the browser plays it once. An authorized admira.store/XpaceOS session is required; generation spends credits, playback does not. The free Local browser voice remains available and uses es-ES or en-US according to the interface language. The announcement plays once, with no repetition counter; Stop cancels the pending local generation request and remaining repetitions. Gender choice is remembered in this browser. Changing language stops current playback and updates both voices without clearing the text. Music is lowered during playback and restored on completion, stop or failure. Text is retained across language changes. Failures or master mute show an error without confirming playback or silently replacing the voice. Playback is local to the virtual store; it does not broadcast to physical stores. /comunicar and /aviso retain their behavior.

1. Open Options → Public Announcement System.
2. Choose Sara Martín or David Martín.
3. Enter up to 1500 characters and press Make Announcement. If required, Sign in and return to the twin.
4. Wait for preparation and the reading, or press Stop.

## Contrato compartido / Shared contract

- Controller: `window.XpaceAnnouncements.play(text,{language,muted,voice})`, `stop()`, `state()`. Voice values: `female`, `male`, `browser`.
- UI: `#announcementText`, `#announcementVoice`, `#announcementStatus`, actions `mega` and `megaStop`. Preference key: `xpace-announcement-voice-v1`.
- Same-origin POST `/admira-xp/announcement-tts` accepts `{text,voice,language}` (`language`: `es` or `en`; absent defaults to `es`). Mandatory existing perimeter session and same-origin request. Only the four fixed voice IDs mapped by language and gender are allowed; 1500 characters maximum. Keys never reach the browser.
- Spanish / ESP: Female: Sara Martín, Gentle and Layered, `KHCvMklQZZo0O30ERnVn`. Male: David Martín, Confident and Balanced, `Nh2zY9kknu6z4pZy6FhD`. Both native Castilian Spanish from Spain. Source: https://elevenlabs.io/text-to-speech/spanish .
- English / ENG: Female: Cassidy, Crisp Podcaster, `56AoDkrOh6qfVPDXZ7Pt`. Male: James, Husky Storyteller, `EkK5I93UQWFDigLMpZcX`. Native English voices. Source: https://elevenlabs.io/text-to-speech/english .
- Server: private `AnnouncementTts` entrypoint (`pixer-eleven`), ElevenLabs `eleven_v4` through `/v1/text-to-dialogue`, `language_code=es|en`, `mp3_44100_192`. Existing Creator tier supports 192 kbps; lossless 44.1 kHz needs Pro, no plan upgrade performed. Source: https://elevenlabs.io/docs/api-reference/text-to-dialogue/convert .
- One audio generation per submission, reused for exactly three completed readings with 250 ms gaps. Stop/replacement/language change/master mute/page exit abort the pending browser request, invalidate callbacks, release blob URLs and restore music. A generation already accepted by ElevenLabs may still consume credits after cancellation.
- Both music players retain position, mute and pause state; volume changes made during playback are retained. No silent fallback from premium to browser voice.
- `ANNOUNCEMENT_TTS` is a private Cloudflare service binding to the named `AnnouncementTts` entrypoint in `pixer-eleven`. It only accepts the two genders in the two supported languages and 1500 characters. The Pages proxy validates the signed perimeter session and origin before invoking it. No service credential is copied into Pages; the ElevenLabs key remains in its existing Worker.
- Spanish mirror: https://www.admira.store/admira-xp/docs/announcements.md . Source: https://www.xpaceos.com/admira-xp/docs/announcements.md . MCP help topic: announcements/locuciones; xpaceos://help; https://mcp.admira.store/help . All 35 tools retained. No physical store integration.

## Configuración y validación / Configuration and validation

El enlace privado `ANNOUNCEMENT_TTS` está configurado en admira.store y XpaceOS. Las voces españolas e inglesas se han generado realmente con Eleven v4 a MP3 44,1 kHz/192 kbps. Las pruebas cubren la lectura única, la repetición opcional (times), cancelación, restauración de música y el control de sesión/origen. La versión desplegada se consulta en `/version.json`; la reproducción requiere sesión autorizada y audio habilitado. Seguimiento: misión FLT-101624 · voces españolas para Locuciones.

The private `ANNOUNCEMENT_TTS` binding is configured in admira.store and XpaceOS. Spanish and English voices have been generated with Eleven v4 at MP3 44.1 kHz/192 kbps. Tests cover three readings, cancellation, music restoration and session/origin checks. The deployed release is available at `/version.json`; playback requires an authorized session and enabled audio. Tracking: mission FLT-101624 · Spanish voices for announcements.

Dependencia de dominio: `www.xpaceos.com` todavía sirve GitHub Pages y no ejecuta el proxy. El origen `xpaceos.pages.dev` sí tiene Functions y el enlace privado. Las voces de pago del dominio XpaceOS dependen de su migración pendiente a Cloudflare Pages; admira.store ya usa Cloudflare Pages.

Domain dependency: `www.xpaceos.com` still serves GitHub Pages and cannot run the proxy. `xpaceos.pages.dev` has Functions and the private binding. Paid voices on the XpaceOS domain depend on its pending Cloudflare Pages migration; admira.store already uses Cloudflare Pages.

## Sesión conservada / Retained session

Acceso con la cuenta Google de Admira: al abrir el Xpacio como aplicación se verifica tu identidad antes de generar imágenes o locuciones. La sesión humana se conserva durante 30 días de uso en este navegador y se renueva al volver, sin una contraseña propia de XpaceOS. Google reutiliza la cuenta conectada cuando puede; el primer acceso o una sesión Google cerrada pueden requerir elegir la cuenta o autenticarse en Google. Los permisos de AdmiraNeXT siguen activos y revocables. Imagen y Locuciones muestran Sesión activa cuando la sesión está verificada. Cerrar sesión impide la reconexión automática inmediata. No se almacenan claves en el navegador. Por ahora, la entrada interactiva de xpaceos.com abre admira.store conservando ruta, Xpacio, idioma y parámetros; los reproductores incrustados conservan su acceso público. La migración del DNS de GoDaddy a Cloudflare Pages sigue pendiente.

Access with your Admira Google account: opening the Xpace as an application verifies your identity before image or announcement generation. Human sessions are retained for 30 days of use in this browser and renewed on return, without a separate XpaceOS password. Google reuses a connected account when available; the first visit or a signed-out Google session may require choosing an account or authenticating with Google. AdmiraNeXT permissions remain enforced and revocable. Image and Public Announcement System show Session active when access is verified. Signing out prevents immediate automatic reconnection. No keys are stored in the browser. For now, interactive xpaceos.com entry opens admira.store while retaining the route, Xpace, language and parameters; embedded players retain public access. GoDaddy DNS migration to Cloudflare Pages remains pending.

Contract: https://www.admira.store/admira-xp/docs/session-access.md

## Archivo automático / Automatic archive

Opciones → Vídeo: escribe en Qué quieres anunciar (hasta 1500 caracteres) y pulsa Generar vídeo (Grok). Se crea un vídeo de 8 segundos, 16:9 y 720p, con el idioma ESP/ENG seleccionado. El estado muestra generación y guardado; al terminar aparece el reproductor y Ver en Stock. Imágenes, vídeos y locuciones ElevenLabs se archivan automáticamente en Stock con ID, número de catálogo, hash y URL estable. Una locución se genera una vez y se reproduce una vez. La sesión Admira existente sirve para las tres funciones, sin otra contraseña. Reintentar recupera el mismo trabajo; el servidor puede terminar el guardado aunque cierres la página. Un nuevo trabajo consume otra generación de pago. Publicar en Stock sigue sus contratos y distribución existentes; este botón no crea una campaña ni conecta equipos físicos.

Options → Video: enter What do you want to advertise? (up to 1500 characters), then press Generate video (Grok). It creates an 8-second, 16:9, 720p video in the selected ESP/ENG language. Status shows generation and saving; once complete, the player and Open in Stock appear. Images, videos and ElevenLabs announcements are automatically archived in Stock with an ID, catalog number, hash and stable URL. Each announcement is generated once and played once. The existing Admira session covers all three functions, without another password. Retrying recovers the same operation; the server can finish archiving after you close the page. A new operation consumes another paid generation. Stock publication follows its existing contracts and distribution; this button does not create a campaign or connect physical devices.

Contrato actual / Current contract: [Vídeo y Stock](https://www.admira.store/admira-xp/docs/video-stock.md). Image JSON now returns a Stock job, not base64; audio returns MP3 with X-Stock-Id/Url/Num and X-Media-Job, or JSON while archiving. POST requests include requestId and the private RPC receives server-derived owner; see the shared guide.

## Megafonía en Stock / Public announcements in Stock

Cada locución ElevenLabs se guarda automáticamente en Stock → Megafonía de Pixeria antes de entregarse al reproductor (tipo locucion). Opciones → Locuciones muestra Última locución guardada automáticamente, el número de catálogo y Ver en Stock · Megafonía. El enlace abre el archivo guardado y se conserva al recargar la pestaña. Reintentar recupera el mismo trabajo y audio; un fallo de guardado no confirma archivo ni emisión. La voz local gratuita del navegador reproduce el texto sin crear un archivo: elige una voz ElevenLabs para archivarlo.

Each ElevenLabs announcement is automatically saved to Pixeria Stock → Public announcements before reaching the player (type locucion). Options → Public Announcement System shows Last announcement saved automatically, the catalogue number and Open in Stock · Public announcements. The link opens the saved file and survives a tab reload. Retrying recovers the same job and audio; an archive failure does not confirm saving or playback. The free local browser voice reads the text without creating a file: choose an ElevenLabs voice to archive it.

Contrato / Contract: `#announcementArchiveStatus`, `#audioStockLink`; recibo / receipt `sessionStorage[xpace-media-stock-audio.v1]`. Fuente / Source: `pixer-eleven` guarda antes de responder / archives before responding, `type=locucion`, `motor=elevenlabs-v4`. URL estable / Stable URL: `https://www.pixeria.com/stock.html?highlight=<Stock ID>`. Catálogo compartido / Shared catalogue: `https://stock.admira.store/stock/index.json`. Validado / Verified: locución / announcement #1385 · audio ElevenLabs archivado, ID `1791236723173-oh9hkl`. No se ha generado otro audio de pago para esta comprobación / No additional paid audio was generated for this check.

## /audio mute y prioridad de las locuciones / /audio mute and voiceover priority (7-oct-2026)

ES: /audio mute para TODO el sonido del gemelo: hilo musical (también el de Starbucks en Matrix), locuciones, aviso de cierre, altavoces, megafonía de pixeria, voz de Admirito, /comunicar, efectos, ambiente y el sonido de los vídeos. Con el audio silenciado no arranca ninguna locución ni el botón Escuchar («Audio silenciado · /audio unmute»). /audio unmute devuelve la música que estaba sonando; las locuciones cortadas no se reanudan. Las locuciones tienen prioridad sobre el hilo musical: al empezar una (Experto, PREVIOS, personas y altavoces de Matrix, aviso de cierre, megafonía, /comunicar con ElevenLabs) la música se PARA, y al terminar sigue en el mismo punto si existía y estaba sonando. Antes sólo bajaba al 6 % o seguía avanzando a volumen cero. Límite: las experiencias incrustadas de otros dominios (quiosco, avatar digital y gestor de colas abiertos en grande) llevan su propio audio y no obedecen a /audio mute. Contrato de página: `window.dsMasterMute` (booleano), evento `xpace:master-mute` con `detail.muted`, `window.XpaceMusicHold()` (para la música y devuelve la función que la reanuda) y `window.__xpaceMusicHeld` (música parada por una locución).

EN: /audio mute stops ALL sound in the twin: background music (including the Starbucks player in Matrix), voiceovers, closing announcement, speakers, pixeria PA, Admirito's voice, /comunicar, effects, ambience and video sound. While muted, no voiceover and no Listen button will start (“Audio muted · /audio unmute”). /audio unmute brings back the music that was playing; interrupted voiceovers are not resumed. Voiceovers take priority over background music: when one starts (Expert, PREVIEWS, Matrix people and speakers, closing announcement, PA, /comunicar with ElevenLabs) the music is PAUSED, and when it ends the music resumes at the same position if there was any and it was playing. It used to drop to 6 % or keep advancing at zero volume. Limit: embedded experiences from other domains (kiosk, digital avatar and queue manager opened full size) carry their own audio and do not obey /audio mute. Page contract: `window.dsMasterMute` (boolean), `xpace:master-mute` event with `detail.muted`, `window.XpaceMusicHold()` (pauses the music and returns the function that resumes it) and `window.__xpaceMusicHeld` (music paused by a voiceover).

Pendiente / Pending: tutorial (`help/index.html`), ayuda CLI y servidor MCP real (`xpaceos-mcp`) aún no describen este comportamiento.
