Skip to content

Commit 26a5df1

Browse files
mudlerclaude
andcommitted
docs: document the OpenAI server and docker images; point to LocalAI for production
Add an OpenAI-compatible server section to the main README (build, curl and OpenAI-client usage) and extend the Docker section to cover the new parakeet.cpp-server image alongside the cli. Note LocalAI as the production path in both the main README and examples/server/README.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d655ede commit 26a5df1

2 files changed

Lines changed: 51 additions & 4 deletions

File tree

README.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,26 +128,35 @@ The CLI auto-selects the first GPU device the ggml registry reports (including i
128128

129129
## Docker
130130

131-
Prebuilt images are published to GitHub Container Registry on every push to `master`. They contain just the `parakeet-cli` binary, so mount a converted `.gguf` model and your audio at runtime. Both the CPU and CUDA images are multi-arch (`linux/amd64` and `linux/arm64`), so the right one is pulled for your host automatically:
131+
Two prebuilt images are published to GitHub Container Registry on every push to `master`, one per binary:
132+
133+
- `ghcr.io/mudler/parakeet.cpp-cli`: the command-line transcriber.
134+
- `ghcr.io/mudler/parakeet.cpp-server`: the [OpenAI-compatible server](#openai-compatible-server).
135+
136+
Each comes in a CPU and a CUDA variant (the CUDA tag is suffixed `-cuda`), and both are multi-arch (`linux/amd64` and `linux/arm64`), so the right one is pulled for your host automatically. They contain just the binary, so mount a converted `.gguf` model (and, for the cli, your audio) at runtime:
132137

133138
```sh
134-
# CPU
139+
# CLI, CPU
135140
docker run --rm \
136141
-v "$PWD/models:/models:ro" \
137142
-v "$PWD/audio:/audio:ro" \
138143
ghcr.io/mudler/parakeet.cpp-cli:latest \
139144
transcribe --model /models/parakeet-tdt_ctc-110m-q5_k.gguf --input /audio/speech.wav --decoder tdt
140145

141-
# CUDA (needs the nvidia container toolkit on the host)
146+
# CLI, CUDA (needs the nvidia container toolkit on the host)
142147
docker run --rm --gpus all \
143148
-v "$PWD/models:/models:ro" -v "$PWD/audio:/audio:ro" \
144149
ghcr.io/mudler/parakeet.cpp-cli:latest-cuda \
145150
transcribe --model /models/parakeet-tdt_ctc-110m-q5_k.gguf --input /audio/speech.wav --decoder tdt
151+
152+
# Server: binds 0.0.0.0 and exposes 8080. Fetch a model by alias on first run,
153+
# or mount a local .gguf. Add --gpus all with the :latest-cuda tag for GPU.
154+
docker run --rm -p 8080:8080 ghcr.io/mudler/parakeet.cpp-server:latest --model tdt_ctc-110m
146155
```
147156

148157
The CUDA image is built on CUDA 13, so it covers everything from Turing up through Blackwell, including GB10 / Grace-Blackwell (DGX Spark) on arm64.
149158

150-
To build the image yourself, see the build args at the top of the [`Dockerfile`](Dockerfile). The CPU image is the portable `GGML_NATIVE=OFF` build, so it runs on any amd64 or arm64 host.
159+
To build the images yourself, see the build args at the top of the [`Dockerfile`](Dockerfile); the cli is the default target and the server is `--target runtime-server`. The CPU image is the portable `GGML_NATIVE=OFF` build, so it runs on any amd64 or arm64 host.
151160

152161
---
153162

@@ -240,6 +249,39 @@ The `parakeet-cli` binary lands at `build/examples/cli/parakeet-cli`.
240249

241250
---
242251

252+
## OpenAI-compatible server
253+
254+
`parakeet-server` is a small HTTP server that speaks the OpenAI transcription
255+
API, so any OpenAI client works by pointing its `base_url` at it. It is built by
256+
default (`PARAKEET_BUILD_SERVER=ON`) and lands at `build/examples/server/parakeet-server`.
257+
258+
```sh
259+
# Serve a model. --model takes a local .gguf, an http(s) URL, a <name>.gguf in
260+
# mudler/parakeet-cpp-gguf, or an alias (downloaded and cached on first run).
261+
parakeet-server --model tdt_ctc-110m --port 8080
262+
263+
# Transcribe over HTTP
264+
curl -F file=@audio.wav -F response_format=verbose_json \
265+
http://localhost:8080/v1/audio/transcriptions
266+
```
267+
268+
```python
269+
from openai import OpenAI
270+
client = OpenAI(base_url="http://localhost:8080/v1", api_key="not-needed")
271+
with open("audio.wav", "rb") as f:
272+
print(client.audio.transcriptions.create(model="parakeet", file=f).text)
273+
```
274+
275+
It supports `response_format` `json` / `text` / `verbose_json` and
276+
`timestamp_granularities[]=word`. This is a single-model, one-request-at-a-time
277+
example that accepts WAV uploads only; see [`examples/server/README.md`](examples/server/README.md)
278+
for the full list of options and known simplifications. **For a production
279+
deployment, use [LocalAI](https://localai.io)**, which embeds parakeet.cpp as a
280+
backend and adds a model gallery, concurrency, multi-model serving, the full
281+
OpenAI API surface, auth, and metrics.
282+
283+
---
284+
243285
## Batching
244286

245287
Single-clip transcription is the default and needs no flags: every `transcribe` call runs one clip at a time, byte-for-byte identical to before. Batching is an opt-in path for decoding several clips together, which matters when you serve many concurrent requests on a GPU.

examples/server/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Point any OpenAI client's `base_url` at it and call
77
This is an example, not a production service. It serves one model, runs one
88
transcription at a time, and accepts WAV uploads only.
99

10+
For a production deployment, use [LocalAI](https://localai.io), which embeds
11+
parakeet.cpp as a backend and adds the things this example deliberately leaves
12+
out: a model gallery, concurrency, multi-model serving, the full OpenAI API
13+
surface, auth, and metrics.
14+
1015
## Build
1116

1217
Built by default with the rest of the project (`PARAKEET_BUILD_SERVER=ON`):

0 commit comments

Comments
 (0)