Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenVoiceOS STT HTTP Server

Turn any OVOS STT plugin into an HTTP microservice for speech-to-text and spoken-language detection.

Pair it with the companion client plugin to offload transcription from an OVOS device, or point existing tooling at the vendor-compatible endpoints below.

Contents

Install

pip install ovos-stt-http-server

The server only hosts plugins. Install at least one STT plugin alongside it:

pip install ovos-stt-plugin-fasterwhisper

Optional extras:

Extra Installs Enables
mcp pip install "ovos-stt-http-server[mcp]" embedded MCP server at /mcp
audio pip install "ovos-stt-http-server[audio]" non-WAV audio decoding (pydub) for the vendor-compat routers

Configuration

The STT plugin is configured exactly as it would be inside an assistant, under mycroft.conf:

{
  "stt": {
    "module": "ovos-stt-plugin-deepgram",
    "ovos-stt-plugin-deepgram": {"key": "xxxxx"}
  }
}

Usage

$ ovos-stt-server --help
usage: ovos-stt-server [-h] --engine ENGINE [--lang-engine LANG_ENGINE]
                       [--host HOST] [--port PORT] [--multi]

options:
  -h, --help                 show this help message and exit
  --engine ENGINE            STT plugin to be used (required)
  --lang-engine LANG_ENGINE  audio language-detection plugin to be used (optional)
  --host HOST                host to bind (default: 0.0.0.0)
  --port PORT                TCP port (default: 8080)
  --multi                    load one plugin instance per language (more memory)

For example, to serve faster-whisper for transcription with matching audio language detection:

ovos-stt-server \
  --engine ovos-stt-plugin-fasterwhisper \
  --lang-engine ovos-audio-transformer-plugin-fasterwhisper

HTTP API

The native API is unauthenticated. Audio is sent as the raw request body.

Method & path Body Purpose
GET /status none Service status and loaded plugin names
POST /stt raw PCM bytes Transcribe audio → plain-text transcript
POST /lang_detect raw PCM bytes Detect the spoken language → {"lang", "conf"}

POST /stt query parameters:

Parameter Default Description
lang system lang or auto Language code, or auto to run language detection first
sample_rate 16000 Audio sample rate in Hz
sample_width 2 Sample width in bytes (2 = int16)

The body must be raw PCM (16-bit signed, mono). Example with a WAV file decoded to PCM on the fly:

# 16 kHz mono int16 PCM in body
curl -s --data-binary @speech.pcm \
  -H 'Content-Type: application/octet-stream' \
  'http://localhost:8080/stt?lang=en&sample_rate=16000&sample_width=2'

See examples/native_example.py for a runnable script that reads a WAV file and posts its PCM frames. Full reference: docs/index.md.

Transformer pipelines

The server can run OVOS transformer plugins around transcription, on every endpoint: audio transformers process audio before STT (an AudioLanguageDetector in the chain resolves lang=auto) and utterance transformers rewrite the transcript before it is returned. Opt-in via the standard mycroft.conf sections:

{
  "utterance_transformers": {
    "ovos-utterance-corrections-plugin": {}
  }
}

Enabling an utterance transformer server-side means clients receive a different transcript than the raw STT output. Use it for fleet-wide vocabulary corrections. See docs/transformers.md for when to run transformers server-side vs on-device and how to avoid double-processing.

AI Agent Integration

MCP: Model Context Protocol

Install the optional extra to expose the server as an MCP tool provider:

pip install "ovos-stt-http-server[mcp]"

When mcp is installed, the server automatically mounts an MCP endpoint at /mcp using the streamable-HTTP transport (compatible with both the legacy SSE path /mcp/sse and the newer POST /mcp format).

Connecting an MCP client

Claude Desktop / claude-code (claude_desktop_config.json)
{
  "mcpServers": {
    "ovos-stt": {
      "transport": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}
ovos-tool-adapters persona JSON
{
  "toolboxes": ["ovos-mcp-toolbox"],
  "ovos-mcp-toolbox": {
    "transport": "http",
    "url": "http://localhost:8080/mcp",
    "timeout": 30
  }
}

Available MCP tool

Tool Description
transcribe Transcribe PCM audio to text. Accepts audio_b64 (base64 PCM) or audio_path (server-side file path), plus lang, sample_rate, sample_width.

Example call (Python MCP client):

import asyncio, base64
from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession

async def main():
    async with streamablehttp_client("http://localhost:8080/mcp") as (r, w, _):
        async with ClientSession(r, w) as session:
            await session.initialize()
            audio_b64 = base64.b64encode(open("speech.pcm", "rb").read()).decode()
            result = await session.call_tool("transcribe", {
                "audio_b64": audio_b64,
                "lang": "en-us",
            })
            print(result.content[0].text)

asyncio.run(main())

UTCP: Universal Tool Calling Protocol

No extra dependencies are required. Every running server exposes a UTCP manual at:

GET /utcp

The response is a UTCP-1.0 JSON document describing the stt, lang_detect, and status tools so any UTCP client can discover and invoke them without separate documentation. The url fields use the server's actual base URL, so the manual is correct even behind a reverse proxy.

Register a UTCP client's provider config at /utcp:

{
  "toolboxes": ["ovos-utcp-toolbox"],
  "ovos-utcp-toolbox": {
    "utcp_config": {
      "tool_providers": [
        {
          "name": "ovos-stt",
          "provider_type": "http",
          "url": "http://localhost:8080/utcp"
        }
      ]
    }
  }
}

Vendor-compatible endpoints

The server mounts compat routers under per-vendor prefixes so existing tools and SDKs that already target a cloud STT API can be pointed at your local OVOS instance with only a base-URL / endpoint override. Every router accepts (and silently ignores) the vendor's auth token. Authentication is the job of your reverse proxy.

Vendor Prefix Client (see examples/)
OpenAI Whisper /v1/audio/transcriptions official openai
Groq /groq/openai/v1/audio/transcriptions official groq
Deepgram /deepgram/v1/listen official deepgram-sdk
Google Cloud STT /google/v1/speech:recognize HTTP
AssemblyAI /assemblyai/v2/... official assemblyai
Gladia /gladia/v2/transcription HTTP (upload → poll)
Speechmatics /speechmatics/... official speechmatics-batch
Microsoft Azure Speech /azure-stt/cognitiveservices/v1 HTTP
AWS Transcribe /aws/... official boto3
IBM Watson STT /watson/speech-to-text/v1/recognize official ibm-watson
ElevenLabs Scribe /elevenlabs/v1/speech-to-text official elevenlabs
Wit.ai /wit/speech official wit
Chromium Web Speech /speech-api/v2/recognize ovos-stt-plugin-chromium
whisper.cpp server /inference HTTP
vosk-server (WebRTC) /vosk-webrtc/offer needs the aiortc extra

A runnable script for each lives in examples/. Full endpoint reference, per-vendor notes, and network-redirect recipes: docs/api-compatibility.md.

Docker

Any plugin can be served with a small Dockerfile:

FROM python:3.11-slim

RUN pip install --no-cache-dir \
    ovos-stt-http-server \
    ovos-stt-plugin-fasterwhisper

EXPOSE 8080
ENTRYPOINT ["ovos-stt-server", "--engine", "ovos-stt-plugin-fasterwhisper"]

Build and run:

docker build -t my-stt-server .
docker run -p 8080:8080 my-stt-server

Each plugin can ship its own Dockerfile in its repository using ovos-stt-http-server as the base.

Documentation

Document Covers
docs/index.md Overview, native HTTP API, architecture, audio format
docs/api-compatibility.md Vendor routers: prefixes, endpoints, clients
docs/audio-formats.md Accepted audio encodings and conversion
docs/transformers.md Audio/utterance transformer plugins around transcription
docs/wyoming-integration.md Home Assistant Voice / Wyoming bridge
docs/voice-pihole.md DNS-redirect + reverse-proxy recipes per vendor

Examples

examples/ holds one runnable script per vendor router (driving each vendor's real client SDK where one exists) plus a native-API script. See examples/README.md.

Credits

Developed by TigreGótico for OpenVoiceOS.

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_stt_http_server-0.25.1a4.tar.gz (571.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_stt_http_server-0.25.1a4-py3-none-any.whl (583.9 kB view details)

Uploaded Python 3

File details

Details for the file ovos_stt_http_server-0.25.1a4.tar.gz.

File metadata

  • Download URL: ovos_stt_http_server-0.25.1a4.tar.gz
  • Upload date:
  • Size: 571.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ovos_stt_http_server-0.25.1a4.tar.gz
Algorithm Hash digest
SHA256 035c9c8c26e129db24eaf04069a6e67dd1fa920e1c42ad4fbfca3a786af55618
MD5 582b13af7537dea6fcd6e6b608d89c58
BLAKE2b-256 626ef9d28be177bd2134839e3ca53844eb0157832068f1d840ba042d95b8984c

See more details on using hashes here.

File details

Details for the file ovos_stt_http_server-0.25.1a4-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_stt_http_server-0.25.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 249b1921f32951f44519d36543f06dfb9a04bbc828295cfe86648ab66fc396d0
MD5 6d313d1f053caaa3ca89646bce8e6aae
BLAKE2b-256 1743f9d819c162f1f48f8860ee978d9b0ee0db1b46033e81398e465256e5430e

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page