{
  "openapi": "3.0.3",
  "info": {
    "title": "OmniVoice on omnira — omnilingual TTS API",
    "version": "1.0.0",
    "description": "Zero-shot text-to-speech in 646 languages, served from an edge device on the omnira fabric. Engine: OmniVoice (k2-fsa, Apache-2.0) running as on-device equipment; text and audio stay in RAM on the serving device. A repeated sentence answers from the fingerprint cache in milliseconds; a fresh sentence synthesizes at roughly a third of its own duration. Voice cloning is disabled on this public demo. Errors use the platform envelope {\"error\":{\"code\",\"what\",\"why\",\"next\"}}.",
    "contact": { "name": "360 World, Inc.", "email": "support@360world.com" }
  },
  "paths": {
    "/v1/tts/speak": {
      "post": {
        "summary": "Synthesize speech — wav bytes out",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["text"],
                "properties": {
                  "text": { "type": "string", "maxLength": 600, "description": "Text to speak, any of 646 languages." },
                  "voice_id": { "type": "string", "description": "From /v1/tts/voices; \"0\" (auto) by default." },
                  "language": { "type": "string", "description": "Optional language name (\"Hindi\") or code (\"hi\"); omit for auto." },
                  "speed_milli": { "type": "integer", "minimum": 500, "maximum": 2000, "default": 1000 },
                  "format": { "type": "string", "enum": ["wav"], "description": "wav only on this service." }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "audio/wav bytes. X-TTS-Cached, X-TTS-Synth-Ms, X-TTS-Duration-Ms headers report cache state and engine timing.",
            "content": { "audio/wav": { "schema": { "type": "string", "format": "binary" } } }
          },
          "400": { "description": "text_required · text_too_long · format_unsupported · speed_out_of_range (platform envelope)." },
          "503": { "description": "engine_unavailable — the on-device engine did not answer (platform envelope)." }
        }
      }
    },
    "/v1/tts/voices": { "get": { "summary": "List voice-design presets", "responses": { "200": { "description": "JSON list of {voice_id,label}." } } } },
    "/healthz": { "get": { "summary": "Service + engine health", "responses": { "200": { "description": "Engine answering." }, "503": { "description": "Engine unreachable (platform envelope)." } } } }
  }
}
