pipecat-local-stt-server 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pipecat_local_stt_server-0.1.0/.claude/scheduled_tasks.lock +1 -0
- pipecat_local_stt_server-0.1.0/.github/workflows/test.yml +56 -0
- pipecat_local_stt_server-0.1.0/.gitignore +12 -0
- pipecat_local_stt_server-0.1.0/CHANGELOG.md +81 -0
- pipecat_local_stt_server-0.1.0/LICENSE +24 -0
- pipecat_local_stt_server-0.1.0/PKG-INFO +522 -0
- pipecat_local_stt_server-0.1.0/README.md +465 -0
- pipecat_local_stt_server-0.1.0/pyproject.toml +70 -0
- pipecat_local_stt_server-0.1.0/scripts/_mlx_spike_driver.py +125 -0
- pipecat_local_stt_server-0.1.0/scripts/benchmark_asr_ab.py +554 -0
- pipecat_local_stt_server-0.1.0/scripts/install_stt_agent.sh +169 -0
- pipecat_local_stt_server-0.1.0/scripts/mlx_teardown_spike.sh +246 -0
- pipecat_local_stt_server-0.1.0/scripts/render_stt_plist.py +144 -0
- pipecat_local_stt_server-0.1.0/scripts/smoke_test_parakeet.py +202 -0
- pipecat_local_stt_server-0.1.0/stt_server/__init__.py +49 -0
- pipecat_local_stt_server-0.1.0/stt_server/__main__.py +380 -0
- pipecat_local_stt_server-0.1.0/stt_server/backend.py +99 -0
- pipecat_local_stt_server-0.1.0/stt_server/backends/__init__.py +1 -0
- pipecat_local_stt_server-0.1.0/stt_server/backends/_thread_util.py +52 -0
- pipecat_local_stt_server-0.1.0/stt_server/backends/mlx_whisper.py +297 -0
- pipecat_local_stt_server-0.1.0/stt_server/backends/parakeet.py +270 -0
- pipecat_local_stt_server-0.1.0/stt_server/client.py +253 -0
- pipecat_local_stt_server-0.1.0/stt_server/env.py +117 -0
- pipecat_local_stt_server-0.1.0/stt_server/examples/__init__.py +0 -0
- pipecat_local_stt_server-0.1.0/stt_server/examples/file_stream.py +61 -0
- pipecat_local_stt_server-0.1.0/stt_server/examples/pipecat_stt_service.py +157 -0
- pipecat_local_stt_server-0.1.0/stt_server/protocol.py +117 -0
- pipecat_local_stt_server-0.1.0/stt_server/server.py +914 -0
- pipecat_local_stt_server-0.1.0/stt_server/text_quality.py +134 -0
- pipecat_local_stt_server-0.1.0/tests/snapshots/koda-stt.plist +41 -0
- pipecat_local_stt_server-0.1.0/tests/test_backend_protocol.py +118 -0
- pipecat_local_stt_server-0.1.0/tests/test_benchmark_asr_ab.py +431 -0
- pipecat_local_stt_server-0.1.0/tests/test_env_helpers.py +176 -0
- pipecat_local_stt_server-0.1.0/tests/test_mlx_teardown_spike.py +384 -0
- pipecat_local_stt_server-0.1.0/tests/test_mlx_whisper_backend.py +218 -0
- pipecat_local_stt_server-0.1.0/tests/test_parakeet_backend.py +465 -0
- pipecat_local_stt_server-0.1.0/tests/test_protocol_version.py +21 -0
- pipecat_local_stt_server-0.1.0/tests/test_render_stt_plist.py +317 -0
- pipecat_local_stt_server-0.1.0/tests/test_stt_post_filter.py +315 -0
- pipecat_local_stt_server-0.1.0/tests/test_stt_server.py +1292 -0
- pipecat_local_stt_server-0.1.0/tests/test_wire_schema_compat.py +268 -0
- pipecat_local_stt_server-0.1.0/uv.lock +1759 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sessionId":"f5d743f9-0d02-4b4f-98b2-1a9f822d588d","pid":48976,"procStart":"Sat May 30 03:52:09 2026","acquiredAt":1780119246008}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# Base + backend extras. The MLX/Parakeet wheels are macOS/Apple-Silicon
|
|
10
|
+
# only, so the full-extras job runs on macos-14 (Apple Silicon runners).
|
|
11
|
+
test-macos:
|
|
12
|
+
runs-on: macos-14
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.12", "3.13"]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
- name: Sync (base + mlx + parakeet)
|
|
22
|
+
run: uv sync --extra mlx --extra parakeet
|
|
23
|
+
- name: Protocol version gate
|
|
24
|
+
run: |
|
|
25
|
+
uv run python -c "from stt_server import protocol; assert protocol.PROTOCOL_VERSION == '0.1', protocol.PROTOCOL_VERSION; print('PROTOCOL_VERSION OK:', protocol.PROTOCOL_VERSION)"
|
|
26
|
+
- name: Run tests
|
|
27
|
+
run: uv run pytest -x
|
|
28
|
+
|
|
29
|
+
# Client-only install on Linux, to prove the base package (no MLX/Parakeet)
|
|
30
|
+
# resolves and the protocol/client/server surface tests pass without the
|
|
31
|
+
# Apple-Silicon-only backends. Backend-specific tests are skipped here.
|
|
32
|
+
test-linux-client:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
strategy:
|
|
35
|
+
fail-fast: false
|
|
36
|
+
matrix:
|
|
37
|
+
python-version: ["3.12", "3.13"]
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- name: Install uv
|
|
41
|
+
uses: astral-sh/setup-uv@v5
|
|
42
|
+
- name: Sync (client only)
|
|
43
|
+
run: uv sync --extra client
|
|
44
|
+
- name: Protocol version gate
|
|
45
|
+
run: |
|
|
46
|
+
uv run python -c "from stt_server import protocol; assert protocol.PROTOCOL_VERSION == '0.1', protocol.PROTOCOL_VERSION; print('PROTOCOL_VERSION OK:', protocol.PROTOCOL_VERSION)"
|
|
47
|
+
- name: Run protocol/server/client tests (skip backend-weight tests)
|
|
48
|
+
run: |
|
|
49
|
+
uv run pytest -x \
|
|
50
|
+
tests/test_stt_server.py \
|
|
51
|
+
tests/test_protocol_version.py \
|
|
52
|
+
tests/test_backend_protocol.py \
|
|
53
|
+
tests/test_wire_schema_compat.py \
|
|
54
|
+
tests/test_env_helpers.py \
|
|
55
|
+
tests/test_stt_post_filter.py \
|
|
56
|
+
tests/test_render_stt_plist.py
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `pipecat-local-stt-server` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **`env_float_first` / `env_int_first` now resolve by presence, not
|
|
13
|
+
non-emptiness** — matching `env_bool_first`. A present-but-empty canonical
|
|
14
|
+
`PIPECAT_STT_*` value now wins and resolves to the default, instead of
|
|
15
|
+
silently falling through to a set legacy `KODA_*` alias. This makes the
|
|
16
|
+
canonical-first precedence rule uniform across bool/float/int knobs. Parsing
|
|
17
|
+
is delegated to `env_float` / `env_int` so coercion is single-sourced.
|
|
18
|
+
Affects the `PIPECAT_STT_WHISPER_*` decode and degenerate-detection knobs.
|
|
19
|
+
|
|
20
|
+
### Internal
|
|
21
|
+
|
|
22
|
+
- `scripts/render_stt_plist.py` now imports `env_first` from `stt_server.env`
|
|
23
|
+
instead of carrying a duplicate `_env_first`; the resolver is single-sourced.
|
|
24
|
+
- `stt_server/text_quality.py` resolves its thresholds through
|
|
25
|
+
`env_float_first` / `env_int_first` (gaining the invalid-value warning that
|
|
26
|
+
the prior inline parse swallowed) instead of `env_first` + inline `float()`.
|
|
27
|
+
|
|
28
|
+
## [0.1.0] - 2026-05-30
|
|
29
|
+
|
|
30
|
+
First public release: a standalone local WebSocket transcription (STT) server,
|
|
31
|
+
client, and pluggable ASR backends, extracted (history-preserving) from the
|
|
32
|
+
private `koda-pipecat` monorepo. Distribution name `pipecat-local-stt-server`,
|
|
33
|
+
import name `stt_server`.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **`PIPECAT_STT_*` environment-variable namespace** as the canonical
|
|
38
|
+
configuration surface, resolved canonical-first (the `PIPECAT_STT_*` name
|
|
39
|
+
wins when set):
|
|
40
|
+
- `PIPECAT_STT_AUTH_TOKEN` — server-side bearer for the serve path.
|
|
41
|
+
- `PIPECAT_STT_LABEL`, `PIPECAT_STT_SOCKET`, `PIPECAT_STT_BACKEND`,
|
|
42
|
+
`PIPECAT_STT_MODEL`, `PIPECAT_STT_LOG_DIR` — LaunchAgent install /
|
|
43
|
+
plist-render parameters (`scripts/install_stt_agent.sh`,
|
|
44
|
+
`scripts/render_stt_plist.py`, `scripts/mlx_teardown_spike.sh`).
|
|
45
|
+
- `PIPECAT_STT_WHISPER_CONDITION_ON_PREVIOUS_TEXT`,
|
|
46
|
+
`PIPECAT_STT_WHISPER_COMPRESSION_RATIO_THRESHOLD`,
|
|
47
|
+
`PIPECAT_STT_WHISPER_LOGPROB_THRESHOLD`,
|
|
48
|
+
`PIPECAT_STT_WHISPER_NO_SPEECH_THRESHOLD` — MLX Whisper decode /
|
|
49
|
+
hallucination-suppression knobs.
|
|
50
|
+
- `PIPECAT_STT_WHISPER_DEGENERATE_TOKEN_RATIO`,
|
|
51
|
+
`PIPECAT_STT_WHISPER_DEGENERATE_MIN_TOKENS` — degenerate-output filter
|
|
52
|
+
thresholds.
|
|
53
|
+
- `env_bool_first` / `env_float_first` / `env_int_first` helpers in
|
|
54
|
+
`stt_server/env.py` for canonical-then-alias resolution.
|
|
55
|
+
- PyPI packaging metadata: authors, `[project.urls]` (Homepage / Repository /
|
|
56
|
+
Issues), trove classifiers (BSD-2-Clause, Python 3.12 / 3.13, macOS,
|
|
57
|
+
speech / AI topics), and keywords.
|
|
58
|
+
- `stt_server/examples/pipecat_stt_service.py` — a runnable Pipecat
|
|
59
|
+
`SegmentedSTTService` subclass (`LocalWebSocketSTTService`) wiring
|
|
60
|
+
`TranscriptionClient` into a pipeline, plus README sections on choosing a
|
|
61
|
+
backend/model (Whisper + Parakeet) and the Pipecat integration. The example
|
|
62
|
+
imports `pipecat`, which remains an optional, non-declared dependency.
|
|
63
|
+
|
|
64
|
+
### Deprecated
|
|
65
|
+
|
|
66
|
+
- All `KODA_STT_*` environment-variable names (and the
|
|
67
|
+
`KODA_TEXT_QUALITY_DEGENERATE_*` names) are **deprecated but still honoured**
|
|
68
|
+
as backward-compatible aliases. Precedence is canonical-first: a
|
|
69
|
+
`PIPECAT_STT_*` name wins when set, otherwise the legacy `KODA_*` name is
|
|
70
|
+
used. No existing `KODA_STT_*` deployment breaks. New deployments should
|
|
71
|
+
prefer the `PIPECAT_STT_*` names; the aliases may be removed in a future
|
|
72
|
+
major release.
|
|
73
|
+
|
|
74
|
+
### Notes
|
|
75
|
+
|
|
76
|
+
- `STT_WS_TOKEN` (the client-side / probe bearer) is unchanged and remains
|
|
77
|
+
strictly separate from the server-side `PIPECAT_STT_AUTH_TOKEN`.
|
|
78
|
+
- Wire protocol is unchanged: `PROTOCOL_VERSION == "0.1"`; the `server.hello`
|
|
79
|
+
and `server.status` shapes are stable.
|
|
80
|
+
|
|
81
|
+
[0.1.0]: https://github.com/vr000m/pipecat-local-stt-server/releases/tag/v0.1.0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Varun Singh
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|