Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main, develop]
branches: [master, develop]
pull_request:
branches: [main]
branches: [master]

jobs:
lint-and-test:
Expand All @@ -28,12 +28,6 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}

- name: Install build tools
run: pip install hatchling grpcio-tools

- name: Generate gRPC stubs
run: python hatch_build.py

- name: Install package with dev dependencies
run: pip install -e ".[dev]"

Expand Down Expand Up @@ -62,7 +56,7 @@ jobs:
python-version: "3.11"

- name: Install build tools
run: pip install build hatchling grpcio-tools
run: pip install build hatchling

- name: Build wheel and sdist
run: python -m build
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ venv/
env/
.env

# Generated gRPC stubs (regenerate with: make proto)
livekit/plugins/techmo/_proto/techmo/

# IDEs
.idea/
.vscode/
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project will be documented here.

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Fixed
- Fresh installs failing on import with `VersionError` (protobuf gencode newer than runtime):
the build hook generated stubs with whatever `grpcio-tools` was newest, independent of the
protobuf runtime in the environment
- Editable installs (`pip install -e .`) shadowing `livekit.agents`: the empty
`livekit/__init__.py` and `livekit/plugins/__init__.py` turned the shared namespace into a
regular package; they are removed

### Changed
- gRPC stubs now come from the `techmo-asr-api` package (1.1.4) instead of being generated
from `proto/` at build time; `hatch_build.py`, `proto/` and the `grpcio-tools` build
dependency are removed, and `--no-build-isolation` is no longer needed
- Dependencies: `protobuf>=5.29.0` and `grpcio>=1.70.0` (required by the `techmo-asr-api`
stubs), `livekit-agents<2.0`
- CI now runs on pushes and pull requests to `master` (it targeted a non-existent `main`)
- README requirements aligned with the package metadata
- Lint, format and mypy issues fixed so the CI passes; mypy no longer pins `python_version`

## [0.2.0] - 2026-09-30

### Added
Expand Down
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
.PHONY: proto install install-dev lint format typecheck test clean
.PHONY: install install-dev lint format typecheck test clean

PROTO_DIR := proto
OUTPUT_DIR := livekit/plugins/techmo/_proto

# Generate gRPC/protobuf Python stubs from .proto files
proto:
pip install grpcio-tools --quiet
python hatch_build.py

# Install the package in editable/dev mode (also generates protos)
# Install the package in editable/dev mode
install-dev:
pip install -e ".[dev]"

Expand All @@ -28,7 +20,6 @@ test:
pytest tests/ -v

clean:
rm -rf $(OUTPUT_DIR)/techmo
rm -rf build dist *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete
41 changes: 15 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,34 @@
- TLS and mutual-TLS support
- Multiple language groups / model selection
- MRCP timeout controls (no-input, recognition, speech-complete, speech-incomplete)
- Compatible with LiveKit Agents >= 1.5
- Compatible with LiveKit Agents 1.x

## Requirements

- Python >= 3.10
- `livekit-agents >= 1.5`
- `grpcio >= 1.63`
- `protobuf >= 5.0`
- `livekit-agents >= 1.0, < 2.0` (tested with 1.5.1 and 1.8.3)
- `grpcio >= 1.70`
- `protobuf >= 5.29`
- [`techmo-asr-api`](https://github.com/techmo-pl/asr-api-python) 1.1.4 (gRPC stubs; installed automatically)
- Access to a running **Techmo ASR** gRPC server

## Installation

### From source

```bash
git clone https://github.com/techmo-pl/livekit-plugins-techmo
cd livekit-plugins-techmo

# Install build tools
pip install grpcio-tools hatchling

# Install the plugin (stubs are generated at build time)
pip install --no-build-isolation .
pip install "livekit-plugins-techmo @ git+https://github.com/techmo-pl/livekit-plugins-techmo.git@<version-tag>"
```

> **Note:** The `--no-build-isolation` flag is required because the build hook generates
> gRPC Python stubs from the `.proto` files in `proto/` at install time.
> The stubs are placed in `livekit/plugins/techmo/_proto/`.

To regenerate stubs manually after changing `.proto` files:
or from a clone:

```bash
pip install grpcio-tools
python hatch_build.py
git clone https://github.com/techmo-pl/livekit-plugins-techmo
cd livekit-plugins-techmo
pip install .
```

The gRPC stubs come from the [`techmo-asr-api`](https://github.com/techmo-pl/asr-api-python)
package (a dependency), so nothing is generated at install time.

## Quick Start

```python
Expand Down Expand Up @@ -166,9 +158,6 @@ LIVEKIT_LOG_LEVEL=DEBUG python my_agent.py dev
## Development

```bash
# Generate gRPC stubs
python hatch_build.py

# Run linter
ruff check .

Expand All @@ -184,8 +173,8 @@ TECHMO_ASR_ADDRESS=localhost:5555 pytest tests/test_integration.py -v

## API Version

This plugin uses the **Techmo ASR v1p1** gRPC API. The `.proto` definition is located at
`proto/techmo/asr/api/v1p1/asr.proto`.
This plugin uses the **Techmo ASR v1p1** gRPC API (`asr_api.v1p1` from
[`techmo-asr-api`](https://github.com/techmo-pl/asr-api-python), which also holds the `.proto` definitions).

## License

Expand Down
4 changes: 2 additions & 2 deletions examples/basic_stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
JobContext,
WorkerOptions,
cli,
llm,
)
from livekit.agents.pipeline import VoicePipelineAgent

from livekit.plugins.techmo import STT

logger = logging.getLogger("techmo-example")
Expand All @@ -35,7 +35,7 @@ async def entrypoint(ctx: JobContext) -> None:
# service_address can also be read from TECHMO_ASR_ADDRESS env var
stt_engine = STT(
service_address=os.environ.get("TECHMO_ASR_ADDRESS", "localhost:5555"),
language_group="pl", # Polish language group — adjust as needed
language_group="pl", # Polish language group — adjust as needed
interim_results=True,
sample_rate=16000,
)
Expand Down
6 changes: 2 additions & 4 deletions examples/streaming_stt_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import asyncio
import logging
import os
import struct
import sys
import wave

Expand All @@ -34,11 +33,10 @@ def read_wav_pcm(path: str) -> tuple[bytes, int]:
async def transcribe_file(wav_path: str) -> None:
try:
from livekit import rtc

from livekit.plugins.techmo.stt import STT
except ImportError as e:
raise SystemExit(
"Install dependencies first: pip install livekit-plugins-techmo livekit-rtc"
) from e
raise SystemExit("Install dependencies first: pip install livekit-plugins-techmo livekit-rtc") from e

address = os.environ.get("TECHMO_ASR_ADDRESS", "localhost:5555")
pcm, sample_rate = read_wav_pcm(wav_path)
Expand Down
113 changes: 0 additions & 113 deletions hatch_build.py

This file was deleted.

Empty file removed livekit/__init__.py
Empty file.
Empty file removed livekit/plugins/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion livekit/plugins/techmo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from livekit.agents import Plugin

from .log import logger
from .stt import STT, STTOptions, SpeechStream
from .stt import STT, SpeechStream, STTOptions
from .version import __version__

__all__ = [
Expand Down
55 changes: 0 additions & 55 deletions livekit/plugins/techmo/_proto/__init__.py

This file was deleted.

Loading
Loading