Repository navigation
feat: Parakeet-TDT-0.6B-v3 as a fast CPU transcription backend for short audio - #29
Merged
Merged
Conversation
…r short audio A second OpenAI-compatible transcription backend (onnx-asr on ONNX Runtime, int8 model baked into a Chainguard Python image). The router sends /v1/audio/transcriptions to it only when the multipart model field names parakeet-tdt-0.6b-v3; everything else, including translations, stays on Whisper. The chart adds an optional parakeet Deployment, Service and a NetworkPolicy that admits only the router (disabled by default). Refs #28
Possible relctl commands for this Pull RequestVersion scheme: calver. The version of the release is the date of the release ( Need more help? Have a look at my repo This message was created by relctl and can be disabled by the env variable |
…load is parsed - router: read at most 1 MiB to find the model field, then stream the rest; a later or missing field goes to Whisper - parakeet: admission middleware answers 429 and 413 before Starlette spools the upload; decode from the spooled file without a second copy; 504 after REQUEST_TIMEOUT_S; OpenAI-style error bodies - image: hash-pinned requirements installed with --require-hashes - chart: refuse to render when concurrent uploads can exceed the /tmp volume; request timeout; note on kubelet probes and the NetworkPolicy Refs #28
Contributor
Author
|
Review follow-up:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28
What
deploy/parakeet/server.py: OpenAI-compatiblePOST /v1/audio/transcriptionson onnx-asr 0.12.0 + ONNX Runtime 1.32 (CPU). onnx-asr was chosen over sherpa-onnx because its only dependency is numpy. Decoding and resampling to 16 kHz mono with PyAV (FFmpeg bundled in the wheel): wav, mp3, ogg/opus, webm/opus, mp4/m4a. Formatsjson,text,verbose_json(segments split at sentence punctuation, words with start/end/confidence),srt,vtt. Audio above 30 s is cut at a quiet point and transcribed in chunks; aboveMAX_AUDIO_S(120) it is rejected with 413.MAX_CONCURRENT+MAX_QUEUE, then 429 withRetry-After. Warmup before/healthreports ready. Logs carry sizes and timings, never audio or text.deploy/Containerfile.parakeet: Chainguard wolfi-base (digest-pinned) with Python 3.13 (the public Chainguard Python image is on 3.15, which has no ONNX Runtime wheels yet). Model files pinned by revision and SHA-256, baked in (no runtime download, no pickle). CC-BY-4.0 attribution in/opt/model/NOTICEand the image description. 1.08 GB./v1/audio/transcriptionsgoes to Parakeet only when it is enabled and the multipartmodelfield isparakeet-tdt-0.6b-v3(a provider prefix is accepted). Everything else, including translations, goes to Whisper unchanged. The body is buffered only up to themodelpart.parakeetDeployment, Service and NetworkPolicy (ingress only from the router, no egress), soft anti-affinity to the embedding pods, read-only root filesystem,enabled: falseby default.parakeet(imageparakeet:tdt-0.6b-v3-<CalVer>), CI jobs for the server tests and the chart rendering test.Measurements (container, AVX2 host)
Peak memory 1.6 GiB (2 CPUs, 66 s). WER on two synthetic German clips with domain terms: 11.4 % (12.7 s) and 11.3 % (32.9 s); Whisper large-v3-turbo with a domain prompt: 14.3 % and 8.3 % on the same clips.
Tests
go test -race ./...,golangci-lint: routing by model id (model before/after the file, prefix, unknown id, disabled backend, translations), body passed through byte for bytepytest deploy/parakeet(19 tests, fake model, real decoding incl. webm/opus, ogg/opus, m4a, mp3)scripts/test-chart.shOpen points