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
7 changes: 3 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Guidance for AI coding agents working in this repository.

## What this repo is

A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recognition) Service. Entry point: `asr_client.__main__:main` (installed as `asr-client`). The gRPC stubs come from a Git submodule (`submodules/asr-api-python`) and are generated at install time — they are never committed.
A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recognition) Service. Entry point: `asr_client.__main__:main` (installed as `asr-client`). The gRPC stubs come from `techmo-asr-api` (fetched from `github.com/techmo-pl/asr-api-python` at install time) and are generated at install time — they are never committed.

---

Expand All @@ -15,7 +15,6 @@ A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recogn
Run once after cloning:

```bash
./setup.sh # initialise submodules
./install.sh # create .venv and install package + test deps
```

Expand All @@ -25,7 +24,7 @@ Run once after cloning:
apt install python3-dev portaudio19-dev build-essential
```

If `from asr_api import ...` fails, the submodule is not initialised. Run `./setup.sh` then `./install.sh`.
If `from asr_api import ...` fails, re-run `./install.sh` (it fetches `techmo-asr-api` from GitHub automatically).

---

Expand Down Expand Up @@ -65,7 +64,7 @@ asr_client/
└── VERSION.py # __version__ string
```

The `asr_api` package (gRPC stubs) is installed from `submodules/asr-api-python` under the name `techmo-asr-api`. It is not on PyPI.
The `asr_api` package (gRPC stubs) is installed as `techmo-asr-api @ git+https://github.com/techmo-pl/asr-api-python.git@1.1.4` — fetched from GitHub at install time, not from PyPI.

---

Expand Down
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ FROM python:3.8-slim-bullseye as build-stage
ARG DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore

COPY submodules/asr-api-python /asr-client-python/submodules/asr-api-python/
COPY asr_client /asr-client-python/asr_client/
COPY pyproject.toml .gitmodules /asr-client-python/
COPY .git /asr-client-python/.git
COPY pyproject.toml /asr-client-python/

WORKDIR /asr-client-python

Expand All @@ -26,7 +24,6 @@ RUN apt-get update \

# hadolint ignore=DL3013
RUN pip install --upgrade --no-cache-dir pip \
&& pip install --no-cache-dir ./submodules/asr-api-python \
&& pip install --no-cache-dir .


Expand All @@ -46,9 +43,6 @@ RUN apt-get update \

COPY --from=build-stage /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY --from=build-stage /asr-client-python/asr_client/ /asr-client-python/asr_client/
COPY --from=build-stage /asr-client-python/submodules/asr-api-python/asr_api /asr-client-python/submodules/asr-api-python/asr_api
COPY --from=build-stage /asr-client-python/submodules/asr-api-python/techmo /asr-client-python/submodules/asr-api-python/techmo
COPY --from=build-stage /asr-client-python/submodules/asr-api-python/google /asr-client-python/submodules/asr-api-python/google

WORKDIR /asr-client-python

Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
- [Overview](#overview)
- [Setup](#setup)
- [Requirements](#requirements)
- [Manual submodule update](#manual-submodule-update)
- [Install](#install)
- [Using the provided script](#using-the-provided-script)
- [Manual installation](#manual-installation)
Expand All @@ -22,26 +21,12 @@ For project details, its structure, and functionality, head to [the documentatio

The project can be used as-is and does not require any additional setup.

*For basic development use, consider convenient `./setup.sh`.*

### Requirements

- [Python](https://www.python.org/) >=3.8
- [uv](https://docs.astral.sh/uv/) (install: `curl -LsSf https://astral.sh/uv/install.sh | sh`)
- [PortAudio](https://files.portaudio.com/) 19.6.0 (required by the [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) Python package)

### Manual submodule update

It is the duty of the build configuration to clone all the necessary submodules. However, it sometimes fails, for example, when building a Docker image from an uninitialized repository. In that case, the solution is to download the missing dependencies manually.

Example:

```sh
git submodule update --init --depth 1 submodules/asr-api-python
```

Do not forget about the submodules of the submodules. Eventually, use the `--recursive` flag.

## Install

### Using the provided script
Expand Down
Loading